X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=fKNk3nG/EkAwX9ub qzEgkkYf0pJuuHgAQ43Nk4hYTyz0r41J27Pk5Yvb53CA3CPEsR6B8fpA0uk+Ehed 6lme/xMGknOkfV9msgxwfTd3+kxpzc4+XLmk10QpOtHnvfYY3IOBNOuS074JH3es PSMHz2RYMilvs2VB/2rceA+iKgE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:references:to:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=z1cv57oEZxt8LC16pfCxBa h4xJs=; b=DQrxpfTMHvwPLcK7Mf7x5TaOw06Fdz0ydl1dJAgRLy4tEf5IJAl20l 9xJL3Ua/jr0DtPN0D7qcqVAgJJ6VerCpUQDTLpu0u7DLrvyH4BU6d9miAmzvXHZo a3mZXiHkZJZLxHzeR1b6OzhbfdBf1SaiNZilY6csaBK2dVkD9BdkY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Reply-To: moss AT cs DOT umass DOT edu Subject: Re: alias appears to not work inside a called bash script References: <000001d31acd$108b0340$31a109c0$@rogers.com> <0ac245f1-002b-2993-c1de-e4ddaafa9c7d AT cs DOT umass DOT edu> <99262820-ed21-d20d-8da0-2c0daa29f476 AT gmail DOT com> To: cygwin AT cygwin DOT com From: Eliot Moss Message-ID: <772ae5e5-8ed7-76c4-6d4b-cf352504a8cc@cs.umass.edu> Date: Tue, 22 Aug 2017 13:13:56 -0400 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 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