Package: mawk
Version: 1.3.3-17ubuntu2

Sometimes it's useful (e.g. to print an help screen) to be able to printout the 
name of the running script:

$ mawk ./myscript.awk
myscript.awk
$

In bash ARGV[0] contains the name of the script, but in awk it just contains 
"awk" regardless the script name. So, to get the script name inside awk one 
could make use of something like

 "ps -p " PROCINFO["pid"] " -o comm=" | getline CMDNAME

but PROCINFO is only a gawk feature.

Is it possible to add such feature?

I'm using Ubuntu 14.04 (trusty).

Reply via email to