Vote count: 0
I have a bunch of .sra files I want to convert into .fastq format using fastq-dump from SRAtools. They're all stored in the same directory, so I'd quite like to run a bash script to just cycle through them all and apply fastq-dump function with the various methods. However, I can't quite get the syntax right.
#!/bin/bash
FILES=/home/sam/Documents/Reads
for file in FILES
do
[ fastq-dump "$file" ]
done
This throws 'UNary operator expected'. I'm sure its fairly simple but I'm a bit of a beginner in Bash scripting and not quite sure how the syntax works.
Could anyone give me a hint as to the correct syntax?
Thanks
asked 1 min ago
Iterating through file in Bash and running command
Aucun commentaire:
Enregistrer un commentaire