Menu

trouble with awk command

Help
2003-09-23
2003-11-06
  • Daniel Grigoras

    Daniel Grigoras - 2003-09-23

    Hello,

    I think this is the single mailing list for <gnuplot> and maybe my question isn't in development area. But maybe is ..:-)

    How is possible to make some plots when I use in command :
    plot "<awk '$8 == 1 {print $3, $4 }' file.txt" w points
    but I want to delimite with "index 1" or another index ?

    Because awk delete all blam\nk lines .
    Anybody have a "smart" solution for this ?

    Thanks ,

    Daniel G

     
    • Hans-Bernhard Broeker

      > I think this is the single mailing list for <gnuplot>

      Whatever made you think that?  This is not a mailing list at all. Read what the startup splash message says, again.  It points your directly to the actual mailing lists.

      There's not much point using gnuplot-internal selection algorithm like 'every' or 'index' if you're going to pre-filter your data --- awk is better at that job than gnuplot can ever be.  If you still want to, make sure that blank lines survive your awk script unharmed.  This will make the script a little more tricky, of course.

       
    • Andrew Sadler

      Andrew Sadler - 2003-11-05

      you could try to match and print the blank lines

      plot "<awk '$8 == 1 {print $3, $4} /^$/ {print}' file.txt" w points

      Is that what you wanted?

       
      • Daniel Grigoras

        Daniel Grigoras - 2003-11-06

        Yes, it works.

        Thanks a lot for help.

        DanielG

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.