X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Will Parsons <oudeis@nodomain.invalid>
Subject:  Re: Looking for mkdirhier !
Date: Tue, 22 Aug 2006 21:12:24 +0000 (UTC)
Lines: 21
Message-ID:  <slrneemspo.i33.oudeis@isis.thalatta>
References:  <ecf9gi$eo1$1@sea.gmane.org> <013401c6c60f$44ed2880$a501a8c0@CAM.ARTIMI.COM> <ecff3t$66f$1@sea.gmane.org>
Reply-To: ellenophilos@yahoo.com
User-Agent: slrn/0.9.8.1 (Debian)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

mwoehlke wrote:
> [snip]
>
> Actually, I intentionally did not use a shebang... 'mkdir -p "$@"' 
> should work on any Bourne-like shell, although in this case '#!/bin/sh' 
> should suffice.
>
> I'm used to writing portable scripts; anything other than '#!/bin/sh' is 
> very non-portable, and if the script needs to be run on Bourne+ (i.e. 
> bash or ksh), then the only options are a: try to write a wrapper that 
> invokes the script in bash/ksh as a here-doc (or something equally 
> ugly), or b: don't use a shebang. I generally pick the latter.

I think this is a bad idea, since it breaks if run from csh/tcsh.  I had
the experience not long ago of finding a bunch of scripts written by other
people getting errors when I ran them.  This was a system running HP-UX 
(where the Korn shell is the "standard" shell), and the lack of a shebang 
didn't cause  problems for other people, but I was using tcsh.  (There are 
those that like the Korn shell, but I'm not one of them.)

- Will


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

