bug-bash
[Top][All Lists]
Advanced

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

Special parameter $_ expands to a relative path


From: Angel Tsankov
Subject: Special parameter $_ expands to a relative path
Date: Thu, 01 Sep 2011 09:35:14 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12

Hello,

The Bash Reference Manual (http://www.gnu.org/s/bash/manual/bash.html#Special-Parameters) says:

At shell startup, [$_ is] set to the absolute pathname used to invoke the shell or shell script being executed as passed in the environment or argument list. [...]

However, with GNU bash, version 3.2.39 a simple script (named 'a'):

#!/bin/bash
echo "$_"

prints './a' when invoked as './a'. According to the above excerpt, should it not print an absolute path to 'a' instead?


Regards,
Angel Tsankov




reply via email to

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