Answer the question
In order to leave comments, you need to log in
How to get rid of the backslash if it is immediately followed by an underscore?
Hello, I have this script
ls -ltr | awk '{print$9}' | sed 's/_R.*$//g' | uniq | head -9 | sed -n '1!p' > list
while read -r line
do
echo $line\_R2-paired.fastq.gz
echo "%%%%%%%%%%%%%%%%"
echo " hisat2 -p 8 --dta -q --phred33 -x /scratch/saragood/dimitri/L002_zipped/imam002_hisat_repo/imam002 \
-1 /scratch/saragood/dimitri/L002_zipped/paired/$line\_R2-paired.fastq.gz \
-2 /scratch/saragood/dimitri/L002_zipped/paired/$line\_R1-paired.fastq.gz \
-S /scratch/saragood/dimitri/L002_zipped/sams/$line.sam"
done < list
rm list
-1 /scratch/saragood/dimitri/L002_zipped/paired/RNA-CCC_8T1_S6_L002_R2-paired.fastq.gz
-1 /scratch/saragood/dimitri/L002_zipped/paired/RNA-CCC_8T1_S6_L002\_R2-paired.fastq.gz
-1 /scratch/saragood/dimitri/L002_zipped/paired/-paired.fastq.gz
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question