对于AIX 7.X,我的gnuplot脚本具有以下几行:
set terminal png truecolor size 1950,650 background rgb "#eff1f0"
set output "/xxx/xxxx/xxx/xxx/xxx.png"
set datafile separator ';'
set size ratio 0.2
set bmargin at screen 0.2
unset key
set datafile separator ";"
set ylabel " MB BLOCK " font ",10" offset -1,0
set xlabel font ",10"
set xtics rotate by 45 offset -0.8,-9,-1.8
plot "xx/xx/file.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5,\
plot "xx/xx/file.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5,\
plot "xx/xx/file.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5
除了第一行外,我想删除所有行的模式“ plot” ...使用我的Linux,我可以这样做:
sed '0,/plot/! s/plot//g' myfile.txt
结果是:
set terminal png truecolor size 1950,650 background rgb "#eff1f0"
set output "/var/IBMtools/www/tim/used.png"
set datafile separator ';'
set size ratio 0.2
set bmargin at screen 0.2
unset key
set datafile separator ";"
set ylabel " MB BLOCK " font ",\
"xx/xx/file.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5,\
"xx/xx/file.txt" using 3:xtic(1) title column(2) with linespoints linewidth 2 pointtype 7 pointsize 1.5
但是此命令不适用于AIX。错误是sed: 0602-403 0,/plot/! s/plot//g is not a recognized function.
请,你能告诉我怎么做吗?