...
Code Block |
---|
#fetch samples names
ls --color=never *.gz -1 | awk -F "." '{print $1}' > sample.names
#fetch the path to each FASTQ file
for i in `ls --color=never *.gz`; do echo $i; readlink -f $i >> sample.path ; done
#merge the sample names and FASTQ path
echo "sample,fastq_1" > samplesheet.csv
paste sample.names sample.path | awk '{print $1 "," $2}' >> samplesheet.csv
#remove intermediate files
rm sample.names sample.path |