Web lists-archives.com

Re: alias appears to not work inside a called bash script




On 8/22/2017 1:07 PM, cyg Simple wrote:
On 8/22/2017 11:18 AM, Stephen John Smoogen wrote:
On 22 August 2017 at 10:47, Eliot Moss <moss@xxxxxxxxxxxx> wrote:
On 8/22/2017 10:31 AM, Stephen John Smoogen wrote:

Are you talking bash as sh or bash as bash?  Bash as sh will expand
those aliases.  But you should study
http://tldp.org/LDP/abs/html/aliases.html for all your scripts.  Are
there environment variables that could affect the outcome?

Since the OP has a #! /bin/bash line at the top of his script, I think
he means bash.  However, running the script with sh explicitly does act
as you describe, e.g.:  sh myscript x y z ... in contrast to: myscript x y z.

Regards - EM

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple