Quantcast

variable to awk

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

variable to awk

Patrick Dupre
Hello,

I would like to do the following:
plot "< awk -v a=var '!/^\#/ {x=x+1; print  x*a,$2 }' file

where var is a variable defined in gnuplot
Is it possible?

Thank.

===========================================================================
 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: variable to awk

tmacchant




----- Original Message -----

> From: Patrick Dupre
> To: gnuplot
> Cc:
> Date: 2017/4/9, Sun 06:09
> Subject: [Gnuplot-info] variable to awk
>
> Hello,
>
> I would like to do the following:
> plot "< awk -v a=var '!/^\#/ {x=x+1; print  x*a,$2 }' file
>
> where var is a variable defined in gnuplot
> Is it possible?
>
> Thank.
>

The below thread may be helpful for you.

Tatsuro


------------------------------------------------------------------------------
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: variable to awk

tmacchant
----- Original Message -----

> From: Tatsuro MATSUOKA
> To: Patrick Dupre
> Cc:
> Date: 2017/4/9, Sun 13:46
> Subject: Re: [Gnuplot-info] variable to awk
>
>
>
>
>
> ----- Original Message -----
>>  From: Patrick Dupre
>>  To: gnuplot
>>  Cc:
>>  Date: 2017/4/9, Sun 06:09
>>  Subject: [Gnuplot-info] variable to awk
>>
>>  Hello,
>>
>>  I would like to do the following:
>>  plot "< awk -v a=var '!/^\#/ {x=x+1; print  x*a,$2 }'
> file
>>
>>  where var is a variable defined in gnuplot
>>  Is it possible?
>>
>>  Thank.
>>
>
> The below thread may be helpful for you.
>
> Tatsuro
>
Sorry I had made a mistake.

The below thread may be helpful for you.
You can concatenate strings using '.'

http://stackoverflow.com/questions/36138334/concatenate-2-strings-in-gnuplot

Tatsuro

------------------------------------------------------------------------------
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...