Tcl exposes problem with cygwin/echo?

John Wiersba John.Wiersba@medstat.com
Sat Jul 31 18:34:00 GMT 1999


Hmm, all my mounts are binary.  Also,

% exec /bin/echo asdf
couldn't execute "\bin\echo": no such file or directory
% exec d:/opt/cygwin/bin/echo.exe asdf
asdf
% exec d:/opt/cygwin/bin/echo {"hi"}
\hi"

so something funny is clearly going on here.  (/bin/echo asdf from bash
works fine).

> -----Original Message-----
> From: Larry Hall (RFK Partners, Inc) [ mailto:lhall@rfk.com ]
> Sent: Tuesday, July 13, 1999 12:52 PM
> To: John Wiersba
> Subject: RE: Tcl exposes problem with cygwin/echo?
> 
> 
> I'm quite sure you'll find this is a binary/text issue.  Consult the 
> archives for a discussion of this issue, where it crops up 
> the most, and
> what are the solutions.
> 
> Larry
> 
> 
> At 12:47 PM 7/13/99 -0400, you wrote:
> >But, try this:
> >
> >% set test {"hi"}
> >"hi"
> >%exec echo $test
> >\hi"
> >% set test {"this is a test."}
> >"this is a test."
> >% exec echo $test
> >"this is a test.\
> >
> >-- John
> >
> >> -----Original Message-----
> >> From: McCunney, Dennis [ mailto:DMcCunney@roper.com ]
> >> Sent: Tuesday, July 13, 1999 12:38 PM
> >> To: 'Mike Kuhl'
> >> Cc: Cygwin Mailing list (E-mail)
> >> Subject: RE: Tcl exposes problem with cygwin/echo?
> >> 
> >> 
> >> > -----Original Message-----
> >> > From: Mike Kuhl [ mailto:mkuhl@pixstream.com ]
> >> > Sent: Monday, July 12, 1999 5:19 PM
> >> > To: 'cygwin mailing list'
> >> > Subject: Tcl exposes problem with cygwin/echo?
> >> > 
> >> > I seem to be having a problem.  I'm using cygwin B20.  When I 
> >> > invoke a tcl interactive shell, and do this:
> >> > 
> >> > % set test {"This is a test."}
> >> > % exec echo $test
> >> > 
> >> > I get this:
> >> > 
> >> > "This is a test.\
> >> > 
> >> > Under unix, I get the expected behaviour:
> >> > 
> >> > "This is a test."
> >> > 
> >> > Can anyone explain what the problem is, or what I'm doing 
> >> > wrong?  Any help would be much appreciated.
> >> 
> >> I see that too.  If I go to a shell and invoke Cygwin echo 
> >> directly, as 
> >> 
> >> .\echo "This is a test."
> >> 
> >> it is handled properly. I can also get it to output the expected 
> >> value within a tcl shell by removing the " around "This is a test".
> >> 
> >> I see the same problem whether I run itcl_sh or itcl_wish, 
> >> and whether 
> >> I do it from bash or another shell (4DOS, in my case).
> >> 
> >> The problem seems to happen in the handoff by exec from Tcl to 
> >> echo, where something is mishandling the double quote char.
> >> 
> >> Tcl 7.6 on my SCO Unix server handles it properly.
> >> 
> >> For that matter, I had several different Win32 ports of Tcl from 
> >> other sources, before I acquired the b20 Cygwin distribution.  
> >> Since I'd like to reduce confusion and have _one_ Tcl version on 
> >> my machine, I did a bit of testing.  I discovered that the Cygwin 
> >> ports did not properly run some of the standard tcl scripts from 
> >> the other distributions - I had to use the (apparently identical) 
> >> scripts provided with the Cygwin tools to get the expected 
> behavior.  
> >> I haven't had the time to delve into it very deeply, so I have _no_
> >> idea what is going on there thus far.  
> >> 
> >> ______________________
> >> Dennis McCunney
> >> Technical Manager
> >> Manhattan Phone Center
> >> 212 387 7550 Voice
> >> 212 387 8180 Fax
> >> 
> >> --
> >> 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



More information about the Cygwin mailing list