Reputation: 2385
I want to run two scripts (gunzip and fastx_collapser) for multiple input files. The output from gunzip should be input to fastx_collapser. How do I do this in a loop function?
My try:
for f in *.gz gunzip -c "$f" | fastx_collapser -Q33 -z -o "${f%}.coll.gz"
Upvotes: 0
Views: 34
Reputation: 754570
You need a do
and a done
(and some semicolons if you insist on a single line):
for f in *.gz
do
gunzip -c "$f" | fastx_collapser -Q33 -z -o "${f%}.coll.gz"
done
or:
for f in *.gz; do gunzip -c "$f" | fastx_collapser -Q33 -z -o "${f%}.coll.gz"; done
Upvotes: 1