delorie.com/archives/browse.cgi | search |
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:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=iq1PJPzNvih3eWCw | |
GWEpxmFxnTstVtCC/iLepfg1QqDPFs74Grz/YGu6iXT3upDrQq3qNYa4IFNWzt2m | |
uMmuZW2qQKuqhqEMOxXmBkh53u7JXCsBVLlxCdbuv4vMN8n7cVFZZJ4deGBp5ejp | |
+Xy05ViyvC8904iHyNpOvltAECk= | |
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:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=0tJt3TOh6gNL6UAAYeBzwl | |
R2rl8=; b=Zs1pVG90SGGL0r+givwektWLyHvQ1uKYXy9+NmN/VYM7L+MJ8yA8eL | |
ci6qUk9sLlP54lEYs4bsDb7er4MVpwrQUChTLBePU662Hodl2ElrktqL5yhsxDfG | |
HLgaK8iGMzJYgSnBHcnZS3iX/ggNqHiqHEney46anFn978BmxObVg= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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-Spam-SWARE-Status: | No, score=4.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 |
X-HELO: | smtpback.ht-systems.ru |
Date: | Thu, 6 Feb 2014 05:00:31 +0400 |
From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
Reply-To: | Andrey Repin <cygwin AT cygwin DOT com> |
Message-ID: | <11910654512.20140206050031@mtu-net.ru> |
To: | Warren Young <warren AT etr-usa DOT com>, cygwin AT cygwin DOT com |
Subject: | Re: Newbie Questions |
In-Reply-To: | <52F2D9AF.1060409@etr-usa.com> |
References: | <1898639722 DOT 6893470 DOT 1391541591920 DOT JavaMail DOT root AT ptd DOT net> <52F153AE DOT 5080704 AT gmail DOT com> <52F28215 DOT 5030801 AT ptd DOT net> <52F28330 DOT 6060101 AT cygwin DOT com> <52F2AA5D DOT 4000000 AT etr-usa DOT com> <52F2AD84 DOT 1050008 AT etr-usa DOT com> <709102296 DOT 20140206020738 AT mtu-net DOT ru> <52F2D9AF DOT 1060409 AT etr-usa DOT com> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Greetings, Warren Young! > On 2/5/2014 15:07, Andrey Repin wrote: >> >>> But if you associate .sh with bash.exe, then double-click that script >>> from Windows Explorer, it won't work right, since bash.exe will try to >>> run it as a shell script. >> >> Have you actually tried that? > Yep. >> Try it, you'll be surprised. > I did try it, before sending the previous message pair. > Save the attached file as foo.sh, then run it with "bash foo.sh", rather > than "./foo.sh". This is what happens when you associate *.sh with > bash.exe in Windows Explorer. [C:\home\Daemon]$ bash -c ./foo.sh Hello from Perl! [C:\home\Daemon]$ > Bash tries to interpret the file as a shell script, despite the shebang > line. This is because Bash doesn't do the shebang handling, exec() > does, and Bash treats passed file names as names of shell scripts. It > runs them directly, not through exec(). Perhaps, we have different bash'es... -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 06.02.2014, <04:54> Sorry for my terrible english... -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |