I have a directory of many fasq files. I am using this command to count the read legnth and output into a new file.
sed -n '2~4p' FAX08345_abafd786_a8df7914_1131.fastq | awk '{ print length }' > len.text
I would like to apply this command to all of the fastq files that I have in my directory, and I need to output to create a unique file name, len.x, where x = the file name of the fastq, for example. I am working in Bash.
I would appreciate any help!
Please explain the syntax of a for loop for bash.
New contributor
Em Yoga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1