0
我在腳本中使用以下行。gnuplot輸入的bash腳本
foo=$1
bar=$(printf ' , "%s" u ($1):($2) lw 8 ti' ${foo[@]} ${foo[@]} ${foo[@]} ${foo[@]} )
bar=${bar:2}
echo $bar
這將產生以下行變量酒吧
"rdf_inter_fortran_05-25.xvg" u ($1):($2) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($2) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($2) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($2) lw 8 ti
的價值在於它可以修改腳本,以便輸出爲:
"rdf_inter_fortran_05-25.xvg" u ($1):($2) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($3) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($4) lw 8 ti , "rdf_inter_fortran_05-25.xvg" u ($1):($5) lw 8 ti
呃..........是嗎? –
我修改了這個問題! –