]> git.mxchange.org Git - flightgear.git/commitdiff
Be compatible with newer versions of tail and gnuplot.
authorcurt <curt>
Wed, 15 Apr 2009 18:20:29 +0000 (18:20 +0000)
committerTim Moore <timoore@redhat.com>
Wed, 15 Apr 2009 21:19:30 +0000 (23:19 +0200)
scripts/perl/examples/logging.pl

index 1c56aacae8b9a38af53aaba7b3810710f3ca1692..d11b94d0cbad2d61cf7c71c13750b26e46f7fbe6 100755 (executable)
@@ -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";