delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/16/09:29:22

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sat, 13 Dec 2008 22:41:49 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bash command file gets stuck
Message-ID: <20081214034149.GA6359@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20081214T031132-754 AT post DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <loom.20081214T031132-754@post.gmane.org>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Sun, Dec 14, 2008 at 03:32:14AM +0000, M.O.D wrote:
>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.

Don't name it <something>.bat.  Drop the extension or choose something
besides ".bat" (or ".cmd") and it should work fine.

cgf

--
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/

- Raw text -


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