我有这个bash脚本,它打印出我想在命令行上运行的~800个命令:
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
如何将打印输出直接发送到unix shell命令行?
答案 0 :(得分:2)
您不需要使用printf
。只需在循环中直接执行命令。
试试这个脚本:
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)
答案 1 :(得分:0)
怎么样:
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