Reputation: 690
I have this bash script which prints out ~800 commands I would like to run on the command line:
paste abyss_names.txt abyss_quast.txt | while IFS="$(printf '\t')" read -r f1 f2
do
printf 'python /quast-2.3/quast.py -o %s %s \n' "$f1 $f2"
done
How do I send the print output directly to the unix shell command line?
Upvotes: 1
Views: 115
Reputation: 786291
You don't need to use printf
. Just execute the command directly in the loop.
Try this script:
while IFS=$'\t' read -r f1 f2; do
python /quast-2.3/quast.py -o "$f1" "$f2"
done < <(paste abyss_names.txt abyss_quast.txt)
Upvotes: 2
Reputation: 1591
how about:
paste abyss_names.txt abyss_quast.txt | while IFS="$(printf '\t')" read -r f1 f2
do
$(printf 'python /quast-2.3/quast.py -o %s %s \n' "$f1 $f2")
done
Upvotes: 0