This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On 8/22/2017 1:13 PM, Eliot Moss wrote:
> 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 <> 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
>> 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.

There's also --posix and set -o posix which will cause bash to perform
as the OP reports.  I'm guessing this to be used in the bash startup
files in a global fashion on those systems that you're not having to
specify to use aliases.

cyg Simple

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]