help-bash
[Top][All Lists]
Advanced

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

Re: The _ env variable


From: Lawrence Velázquez
Subject: Re: The _ env variable
Date: Wed, 10 Feb 2021 14:39:56 -0500

> On Feb 10, 2021, at 2:27 PM, Peng Yu <pengyu.ut@gmail.com> wrote:
> 
> Hi,
> 
> It looks like that "_" is set to the path of the program being called.

Among other things, as described in the link below.

> Where is this behavior officially defined?

https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html

> Why is this variable useful, given argv[0] is also the path to the program 
> being called?

The value of argv[0] is not necessarily a path.

https://mywiki.wooledge.org/BashFAQ/028#Why_.240_is_NOT_an_option

vq



reply via email to

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