From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69445 invoked by alias); 22 Aug 2017 17:14:04 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 69413 invoked by uid 89); 22 Aug 2017 17:14:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=act, his X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Aug 2017 17:14:01 +0000 Received: from [128.119.40.245] (csvpn21.cs.umass.edu [128.119.40.245]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id C3BB1405984B; Tue, 22 Aug 2017 13:13:59 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: alias appears to not work inside a called bash script References: <000001d31acd$108b0340$31a109c0$@rogers.com> <0ac245f1-002b-2993-c1de-e4ddaafa9c7d@cs.umass.edu> <99262820-ed21-d20d-8da0-2c0daa29f476@gmail.com> To: cygwin@cygwin.com From: Eliot Moss Message-ID: <772ae5e5-8ed7-76c4-6d4b-cf352504a8cc@cs.umass.edu> Date: Tue, 22 Aug 2017 17:14:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <99262820-ed21-d20d-8da0-2c0daa29f476@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00200.txt.bz2 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 > 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