[Top][All Lists]

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

Re: Is it normal for `bash -s foo` not to make 1=foo available from ~/.b

From: Chet Ramey
Subject: Re: Is it normal for `bash -s foo` not to make 1=foo available from ~/.bashrc?
Date: Tue, 28 Mar 2017 16:43:17 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 3/28/17 12:43 PM, Torka Noda wrote:

> Actually, shouldn't `bash -s`, without any command fed to its
> stdin, exit immediately, anyway...?

No. Why? It reads and executes commands from its standard input, which is
in most cases, the terminal.  However, `bash -s foo </dev/null' should exit

> Plus there is
> apparently no way to get the full list of arguments used to
> call Bash (although some can be found with `set` or `shopt`),
> even after initialization, which seems to me more problematic,
> although if this was never the case, the need probably isn't
> that strong for it either...

No Bourne-style shell provides this feature.

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

reply via email to

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