This is the mail archive of the
mailing list for the Cygwin project.
shell back quote expansion problem
- To: "'cygwin at sourceware dot cygnus dot com'" <cygwin at sourceware dot cygnus dot com>
- Subject: shell back quote expansion problem
- From: "Tarr, Stephen F" <stephen dot f dot tarr at opbu dot xerox dot com>
- Date: Fri, 23 Jun 2000 12:47:22 -0700
I first found this problem with B20, and it still exists in the latest (June
from sourceware.cygnus.com. It affects both bash and tcsh, and probably
shells as well. It appears when running on both 95 and NT 4.
If I use back-quote expansion on a command from the cygwin package,
works fine. If I use back-quote expansion on a native Win32 command-line
(that prints CR-LF at the end of each line of stdout), the shell expansion
instead of using back quotes, I redirect the output of the native command
into a file
and then use "cat file" in the back quotes, it works.
I found this when I was using the "ct lsco" command, which is part of
ClearCase source control package. Since I can't redistribute that command,
contrived an example that uses only the native NT 4 commands. Run the
commands in a directory with one or more ".h" files.
1. back quote expansion works with cygwin binaries
ls -l `ls -1 *.h`
2. back quote expansion works with data from MS-DOS text files
cmd /c dir /b *.h > hfiles
ls -l `cat hfiles`
("dump hfiles" will show that each line is terminated with CR-LF.)
3. back quote expansion fails with output from an MS-DOS command
ls -l `cmd /c dir /b *.h`
Is there some simple workaround or environment setting that I'm missing, or
is this a real bug?
Want to unsubscribe from this list?
Send a message to email@example.com