bash script for gnuplot input -
i using following lines in script.
foo=$1 bar=$(printf ' , "%s" u ($1):($2) lw 8 ti' ${foo[@]} ${foo[@]} ${foo[@]} ${foo[@]} ) bar=${bar:2} echo $bar
this produces following line value of variable 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
is possible modify script output is:
"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
change printf line following :
bar=$(printf ' , "%s" u ($1):($%s) lw 8 ti' ${foo[@]} "2" ${foo[@]} "3" ${foo[@]} "4" ${foo[@]} "5" )
Comments
Post a Comment