[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "$@" not available in rcfile, $ENV, $BASH_ENV...
From: |
Chet Ramey |
Subject: |
Re: "$@" not available in rcfile, $ENV, $BASH_ENV... |
Date: |
Sun, 10 Sep 2017 14:56:50 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 9/10/17 11:11 AM, Stephane Chazelas wrote:
> When running bash as:
>
> bash -s foo bar
>
> "$@" is not available inside .bashrc. Same for $ENV (POSIX
> conformance issue?), $BASH_ENV, or ~/.bash_profile (with bash
> --login -s).
>
> In the case of bash -c, that also affects $0.
Bash has always behaved like this, and it's not a Posix conformance
issue. Is there a compelling reason to change it other than compatibility
with other shells?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/