[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make ARGV[0] more similar to C argv[0] or shell $0

From: Stepan Kasal
Subject: make ARGV[0] more similar to C argv[0] or shell $0
Date: Thu, 24 Sep 2009 12:41:46 +0200
User-agent: Mutt/1.5.19 (2009-01-05)


it was requested through Fedora bug report that GNU awk's ARGV[0]
contains full path if awk was called with a full path.
For example, /bin/awk 'BEGIN{print ARGV[0]}' would print "/bin/awk",
not only "awk".

I observe that that would make ARGV[0] consistent with analogous
constructs in C or shell.  (At least with libc and bash on recent
Fedora GNU/Linux.)

The bug report claims that this feature gets checked by a POSIX
compatibility test, but adds no reference.  I was not able to find
any proof that POSIX requires this.

See http://bugzilla.redhat.com/525381 for the original bug report.

Stepan Kasal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]