bug-bash
[Top][All Lists]
Advanced

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

Re: [doc] confusion over $0 and positional parameters


From: Chet Ramey
Subject: Re: [doc] confusion over $0 and positional parameters
Date: Wed, 27 Aug 2014 08:45:48 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 8/27/14, 8:06 AM, Stephane Chazelas wrote:
> In
> 
>   info -f bash -n 'Invoking Bash'
> 
> we find:
> 
>> `-c'
>>      Read and execute commands from the first non-option ARGUMENT after
>>      processing the options, then exit.  Any remaining arguments are
>>      assigned to the positional parameters, starting with `$0'.

True, it's careless wording.  I will modify it.

The key is that the behavior makes `bash -c string command args' and
`bash command args' equivalent in how they set $0.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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