Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199902200344.TAA11538@interlock.wdni.com> From: "Frederick, Ralph" To: cygwin AT sourceware DOT cygnus DOT com Subject: RE: bash quoting bug? Date: Fri, 19 Feb 1999 19:44:10 -0800 Mime-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2232.9) Content-Type: text/plain; charset="iso-8859-1" Igor, I can reproduce your problem. I believe you were tying to indicate that the problem lies in using the ActiveState binary (regular win32) when calling it from a cygwin bash. I don't know much about either ActiveState Perl or Cygnus' bash, and I don't have a cygwin Perl installed right now but I doubt the problem would occur there if I did, so perhaps the blame lies with ActiveState. Since I can't offer a solution, how about a work around? When you run command line perl script under NT's CMD shell you need to escape the quote characters. Under NT CMD session: perl -e "printf \"a b\n\";" In a UNIX like environment you don't need to: perl -e 'printf "a b\n";' Rather than switch back and forth all the time, I use generic quotes. This runs for me under a CMD prompt and a BASH prompt with ActivePerl and under a Linux bash prompt with a standard Perl build: perl -e "printf qq/a b\n/;" Generic quotes let you define the quote character, so you can use any quote character that does not appear in your string, or matched braces if you like: perl -e "printf qq(a b\n);" Incidentally, I have heard it is "bad" to get in the habit of using printf in perl where print would suffice, though I don't think it matters very often ;-) Ralph Frederick -----Original Message----- From: Brian Smith [mailto:Brian DOT Smith AT PicoDyne DOT com] Sent: Thursday, February 18, 1999 09:18 AM To: cygwin AT sourceware DOT cygnus DOT com Subject: RE: bash quoting bug? Interesting, I'm using BASH on 20.1, and perl version 5.004_04 built for cygwin32, and the results I got were: a b Must be something else, Brian - Brian S. Smith - PicoDyne Corporation > -----Original Message----- > From: cygwin-owner AT sourceware DOT cygnus DOT com > [mailto:cygwin-owner AT sourceware DOT cygnus DOT com]On Behalf Of Igor Schein > Sent: Thursday, February 18, 1999 10:28 AM > To: cygwin AT sourceware DOT cygnus DOT com > Subject: bash quoting bug? > > > Hi, > > this is with default bash and ActivePerl: > > $ perl -e 'printf "a b\n";' > Can't find string terminator '"' anywhere before EOF at -e line 1. > > The above works fine with tcsh ( as well as on any other OS I > tried it ). > So I guess it must be bash bug. > > Thanks > > Igor > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > > -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com