From: "Frederick, Ralph" <frederr@wdni.com>
To: cygwin@sourceware.cygnus.com
Subject: RE: bash quoting bug?
Date: Fri, 19 Feb 1999 19:44:00 -0000 [thread overview]
Message-ID: <199902200344.TAA11538@interlock.wdni.com> (raw)
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.Smith@PicoDyne.com ]
Sent: Thursday, February 18, 1999 09:18 AM
To: cygwin@sourceware.cygnus.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@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Igor Schein
> Sent: Thursday, February 18, 1999 10:28 AM
> To: cygwin@sourceware.cygnus.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@sourceware.cygnus.com
>
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
WARNING: multiple messages have this Message-ID
From: "Frederick, Ralph" <frederr@wdni.com>
To: cygwin@sourceware.cygnus.com
Subject: RE: bash quoting bug?
Date: Sun, 28 Feb 1999 23:02:00 -0000 [thread overview]
Message-ID: <199902200344.TAA11538@interlock.wdni.com> (raw)
Message-ID: <19990228230200.XkHuD9vxgswkECzd-Sv-Q8xZztXL3Eq0U6dcTKYBh54@z> (raw)
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.Smith@PicoDyne.com ]
Sent: Thursday, February 18, 1999 09:18 AM
To: cygwin@sourceware.cygnus.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@sourceware.cygnus.com
> [ mailto:cygwin-owner@sourceware.cygnus.com]On Behalf Of Igor Schein
> Sent: Thursday, February 18, 1999 10:28 AM
> To: cygwin@sourceware.cygnus.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@sourceware.cygnus.com
>
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
next reply other threads:[~1999-02-19 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-19 19:44 Frederick, Ralph [this message]
1999-02-28 23:02 ` Frederick, Ralph
-- strict thread matches above, loose matches on Subject: below --
1999-02-18 7:27 Igor Schein
[not found] ` < 19990218102733.B6936@io.txc.com >
1999-02-18 9:17 ` Brian Smith
1999-02-28 23:02 ` Brian Smith
1999-02-28 23:02 ` Igor Schein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199902200344.TAA11538@interlock.wdni.com \
--to=frederr@wdni.com \
--cc=cygwin@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).