delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/15/21:39:32

X-Spam-Check-By: sourceware.org
Date: Tue, 16 Jan 2007 13:39:05 +1100 (EST)
From: Luke Kendall <luke DOT kendall AT cisra DOT canon DOT com DOT au>
Subject: Changed handling of "!" in /bin/sh?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-Id: <20070116023906.30AB783D05@pessard.research.canon.com.au>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

I have a script that starts #!/bin/sh which has occasional things like
the use of an exclamation mark in a string, or a case statement to
accept an exclamation mark to throw a shell, which has stopped working
now that I've upgraded to a non-ancient Cygwin (i.e. now that sh ==
bash).

It seems that /bin/sh is now trying to interpret "!" as bash would! 
How can I make /bin/sh work like a Bourne shell, globally?

The same script works fine if run by ash instead of bash, and it also
works fine under Linux (where sh is bash), so it seems like there's
some problem with bash's emulation of sh under Cygwin.

I assume from the discussion about making sh == bash back in 2005, that
when invoked as sh it's supposed to be a drop-in replacement for sh,
right?

Any advice?  We have over 200 scripts that will need alteration,
otherwise.  Any idea what I'm doing wrong?

luke


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