awk

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

awk

Patrick Dupre
Hello,

I would like to use BEGIN with awk to define the FS.
How can I do it?
I tried
plot "< paste " . ARG1 . "| awk 'BEGIN { FS = "," } !/^\#/  { print $1 } ' "

But it does not work.

Thanks.

===========================================================================
 Patrick DUPRÉ                                 | | email: [hidden email]
 Laboratoire de Physico-Chimie de l'Atmosphère | |
 Université du Littoral-Côte d'Opale           | |
 Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
 189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
===========================================================================

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: awk

Rob Sargent
awk -F "," '!/^\#/ { print $1 } '


On 06/19/2017 02:53 PM, Patrick Dupre wrote:

> Hello,
>
> I would like to use BEGIN with awk to define the FS.
> How can I do it?
> I tried
> plot "< paste " . ARG1 . "| awk 'BEGIN { FS = "," } !/^\#/  { print $1 } ' "
>
> But it does not work.
>
> Thanks.
>
> ===========================================================================
>   Patrick DUPRÉ                                 | | email: [hidden email]
>   Laboratoire de Physico-Chimie de l'Atmosphère | |
>   Université du Littoral-Côte d'Opale           | |
>   Tel.  (33)-(0)3 28 23 76 12                   | | Fax: 03 28 65 82 44
>   189A, avenue Maurice Schumann                 | | 59140 Dunkerque, France
> ===========================================================================
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> [hidden email]
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Loading...