From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McCarty Subject: Re: Syntax error: Bad substitution Date: Wed, 01 Nov 2006 12:01:46 -0600 Message-ID: <4548E10A.50203@sbcglobal.net> References: <20061028225657.GA18195@bluesong.van.maves.ca> <20061029004107.GA8494@bluesong.van.maves.ca> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-msdos-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-msdos@vger.kernel.org Cristi Mitrana wrote: > On 10/30/06, Ralph Alvy wrote: > >> Cristi Mitrana wrote: > > [..] > >> > >> > That is because the new Ubuntu release uses dash instead of bash for >> > /bin/sh and hence all bash constructs are not supported. >> > >> Isn't that a rather severe change? >> > > It is actually, since dash is just a minimal POSIX shell without all > the features that bash has it. > Any script that uses bash constructs should have #!/bin/bash at the > beginning instead of #!/bin/sh. It's more of an annoyance this days, > at least on linux, because bash is always available in any distro and > it is the default shell. Umm, I believe that all current releases of Linux have $ ls -l /bin/sh lrwxrwxrwx 1 root root 4 Oct 20 2004 /bin/sh -> bash AND bash also behaves somewhat differently when invoked as sh. IMO, use of bash-specific features in released scripts is a bad idea, anyway. It results in extra maintenance. Mike -- p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} This message made from 100% recycled bits. You have found the bank of Larn. I can explain it for you, but I can't understand it for you. I speak only for myself, and I am unanimous in that!