On 2/8/16 7:09 PM, David Hunt wrote:
> Bash Version: 4.3
> Patch Level: 11
> Release Status: release
>
> Description:
> On my notebook running Ubuntu 14.04.3 LTS /bin/sh points to dash, not
> bash.
> To get sh behaviour from bash I use the command `exec -a sh /bin/bash'.
> When I do so bash sets BASH to /bin/sh, which it demonstrably is not.
Bash sets the BASH variable from $0. If $0 is a full pathname, it's used
directly, otherwise it's looked up in $PATH. That algorithm is not
foolproof, and one way to fool it is to disguise the program name.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/