This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bash command file gets stuck
- From: M.O.D. <frjufrjufrju at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 14 Dec 2008 03:32:14 +0000 (UTC)
- Subject: Bash command file gets stuck
I made a command file named gcc.bat:
-----------------------------------
#! /bin/sh
cc `pkg-config --cflags --libs gtk+-2.0` ${1}.cpp -o ${1}
-----------------------------------
I set the execution flag:
-rwx--x--x+ 1 pd None 71 Dec 13 17:25 gcc.bat
I typed the cc command in by hand and it worked fine. But when I try to run
the command file from the Cygwin command line:
-----------------------------------
$ ./gcc.bat murq
E:\cygwin\install\home\pd>#! /bin/sh
'#!' is not recognized as an internal or external command, operable program or
batch file.
E:\cygwin\install\home\pd>cc `pkg-config --cflags --libs gtk+-2.0` ${1}.cpp -o
${1}
-----------------------------------
At this point, the Cygwin command line window is stuck. Nothing I type in has
any effect, including Ctrl-C and Ctrl-Z. I had to use the close window button
at the top right of the window.
I downloaded Cygwin (complete, everything) last Friday (5 Dec) and installed
everything on a clean E: disk on Vista.
I need some advice on how to get command files to work.
Thanks,
Ollie
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/