public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* bash quoting bug?
@ 1999-02-18  7:27 Igor Schein
       [not found] ` < 19990218102733.B6936@io.txc.com >
  1999-02-28 23:02 ` Igor Schein
  0 siblings, 2 replies; 6+ messages in thread
From: Igor Schein @ 1999-02-18  7:27 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: bash quoting bug?
       [not found] ` < 19990218102733.B6936@io.txc.com >
@ 1999-02-18  9:17   ` Brian Smith
  1999-02-28 23:02     ` Brian Smith
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Smith @ 1999-02-18  9:17 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: bash quoting bug?
  1999-02-18  9:17   ` Brian Smith
@ 1999-02-28 23:02     ` Brian Smith
  0 siblings, 0 replies; 6+ messages in thread
From: Brian Smith @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* bash quoting bug?
  1999-02-18  7:27 bash quoting bug? Igor Schein
       [not found] ` < 19990218102733.B6936@io.txc.com >
@ 1999-02-28 23:02 ` Igor Schein
  1 sibling, 0 replies; 6+ messages in thread
From: Igor Schein @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: bash quoting bug?
  1999-02-19 19:44 Frederick, Ralph
@ 1999-02-28 23:02 ` Frederick, Ralph
  0 siblings, 0 replies; 6+ messages in thread
From: Frederick, Ralph @ 1999-02-28 23:02 UTC (permalink / raw)
  To: cygwin

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: bash quoting bug?
@ 1999-02-19 19:44 Frederick, Ralph
  1999-02-28 23:02 ` Frederick, Ralph
  0 siblings, 1 reply; 6+ messages in thread
From: Frederick, Ralph @ 1999-02-19 19:44 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-02-28 23:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-18  7:27 bash quoting bug? 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
1999-02-19 19:44 Frederick, Ralph
1999-02-28 23:02 ` Frederick, Ralph

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).