[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time? |
Date: |
Mon, 11 May 2015 22:25:41 +0300 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Hi.
There is no way to do this, without modifying the gawk source code.
In addition, support multiple -f options and the -e option muddies
the waters, as does how #! works on different *nix systems.
If you don't mind some typing, you can do
gawk -f c:\path\to\prog.awk -v name="c:/path/to/prog.awk" ...
But I'm not sure that helps you.
Sorry,
Arnold
> From: <address@hidden>
> To: <address@hidden>
> Date: Mon, 11 May 2015 12:25:01 -0500
> Subject: [bug-gawk] Can a GAWK script access its full path\name at "run-time?
>
> Sorry if this is a repeat --- I wasn't subscribed to the mailing list when I
> sent
> this the first time, so I'm not sure it posted...
>
> I am trying to find a way for the AWK *script* that is executing to access its
> own path/name. I was hoping that:
>
> gawk -f c:\path\example.awk "BEGIN{print ARGV[0]}"
>
> would print:
>
> c:\path\example.awk
>
> But, of course it does not. Suggestions?
>
> Thanks and regards,
> Jim
>
- [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Jim_Dailey, 2015/05/11
- [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Jim_Dailey, 2015/05/11
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?,
Aharon Robbins <=
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, green fox, 2015/05/11
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Aharon Robbins, 2015/05/12
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Joep van Delft, 2015/05/13
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Aharon Robbins, 2015/05/13
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Eli Zaretskii, 2015/05/13
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, arnold, 2015/05/13
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Eli Zaretskii, 2015/05/13
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Aharon Robbins, 2015/05/14
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Andrew J. Schorr, 2015/05/14
- Re: [bug-gawk] Can a GAWK script access its full path\name at "run-time?, Eli Zaretskii, 2015/05/14