From c74cdade0bf6d9808a0535eef34f08f6ed5c1ea7 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 15 Apr 2009 18:20:29 +0000 Subject: [PATCH] Be compatible with newer versions of tail and gnuplot. --- scripts/perl/examples/logging.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/perl/examples/logging.pl b/scripts/perl/examples/logging.pl index 1c56aacae..d11b94d0c 100755 --- a/scripts/perl/examples/logging.pl +++ b/scripts/perl/examples/logging.pl @@ -147,7 +147,7 @@ sub quick_plot_vs_time { my( $png_image ) = "$plot_file.png"; # strip the leading header off the file so gnuplot doesn't squawk - system( "tail +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); + system( "tail -n +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); # create the gnuplot command file open( CMD, ">$tmpcmd" ); @@ -184,11 +184,11 @@ sub quick_plot { my( $png_image ) = "$plot_file.png"; # strip the leading header off the file so gnuplot doesn't squawk - system( "tail +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); + system( "tail -n +2 $data_file | sed -e \"s/,/ /g\" > $tmpdata" ); # create the gnuplot command file open( CMD, ">$tmpcmd" ); - print CMD "set terminal png color\n"; + print CMD "set terminal png\n"; print "png_image = $png_image\n"; print CMD "set output \"$png_image\"\n"; print CMD "set xlabel \"$xtitle\"\n";