Date: Thu, 26 Oct 2000 18:50:39 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Peter J. Farley III" Message-Id: <2110-Thu26Oct2000185038+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.5h CC: djgpp-workers AT delorie DOT com, snowball3 AT bigfoot DOT com In-reply-to: <4.3.1.0.20001025221409.00ad89b0@pop5.banet.net> (pjfarley AT banet DOT net) Subject: Re: Bash 2.04 beta 6a References: <4 DOT 3 DOT 1 DOT 0 DOT 20001023205604 DOT 00b0edf0 AT pop5 DOT banet DOT net> <39F47A27 DOT 20049 DOT BA7D8C AT localhost> <4 DOT 3 DOT 1 DOT 0 DOT 20001025221409 DOT 00ad89b0 AT pop5 DOT banet DOT net> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Wed, 25 Oct 2000 22:32:58 -0400 > From: "Peter J. Farley III" > > 1. perl calls the bash shell with the command "echo #foo" > 2. Something about the "#" causes bash to ignore everything starting > with the "#" character. > 3. The echo command just sees a blank, so it just outputs an empty > line. If Perl passes the command to Bash, this is expected behavior. What I don't understand is how does this work on Unix. There's one subtlety here that you should be aware of (perhaps it even explains why this works on Unix, but not in DJGPP). Our `system' invokes Bash like this: bash temp-file where `temp-file' holds the entire command line. I'm guessing that on Unix, `system' calls Bash like this: bash -c 'command line' It is possible that # is treated differently in a file and inside the argument to -c.