On 8/24/17 10:59 PM, L A Walsh wrote:

> How does starting a script with "#!/bin/sh start a script in
> bash mode?

It doesn't:

$ ./bash --version
GNU bash, version 4.4.12(4)-release (x86_64-apple-darwin15.6.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cat x6a
#!./sh
alias lf='echo lf'
lf
$ cat x6
#! ./bash --posix
alias lf='echo lf'
lf
$ ./x6
lf
$ ./x6a
lf

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


Reply via email to