This is the mail archive of the
mailing list for the Cygwin project.
Problem call a cygwin command from a dos batch file
- From: "Lisbeth Kellogg" <lisbeth dot kellogg at apioutsourcing dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 29 Jul 2003 15:06:09 -0500
- Subject: Problem call a cygwin command from a dos batch file
I am having a problem with trying to sort a pipe-delimited file using
the cygwin sort command from a dos batch file. If I enter the command
in cygwin environment, it works fine:
sort -t \| -k 3 -k 11 -k 12 -o sortedfile.txt unsortedfile.txt
But I have problems running it from a dos batch file. It appears to
work in Windows XP but not in Windows 2000. The command in the batch
bash -c "sort -t \| -k 3 -k 11 -k 12 -o sortedfile.txt
In Win XP it executes without a problem, but in Win 2000, I get a
message the says, "Input file specified two times," as if it does not
recognize the -o option. If I put the sort command in an echo, I get
the results I would expect, so the -o is not lost:
bash -c "echo sort -t \| -k 3 -k 11 -k 12 -o sortedfile.txt
Rearranging the arguements and adding extra escape characters in various
combinations don't seem to help.
Any ideas, please?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html