delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/06/23/15:53:48

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <CF29360CADE8D31196E200508B8B88B63581BE@UsaWvMS01.opbu.xerox.com>
From: "Tarr, Stephen F" <stephen DOT f DOT tarr AT opbu DOT xerox DOT com>
To: "'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: shell back quote expansion problem
Date: Fri, 23 Jun 2000 12:47:22 -0700
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)

I first found this problem with B20, and it still exists in the latest (June
23) binaries
from sourceware.cygnus.com.  It affects both bash and tcsh, and probably
other
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,
everything
works fine.  If I use back-quote expansion on a native Win32 command-line
program
(that prints CR-LF at the end of each line of stdout), the shell expansion
fails.  If
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
Rational's
ClearCase source control package.  Since I can't redistribute that command,
I've
contrived an example that uses only the native NT 4 commands.  Run the
following
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?

Steve Tarr
Xerox Corp.
Stephen DOT Tarr AT opbu DOT xerox DOT com




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019