X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Will Parsons Subject: Re: Looking for mkdirhier ! Date: Tue, 22 Aug 2006 21:12:24 +0000 (UTC) Lines: 21 Message-ID: References: <013401c6c60f$44ed2880$a501a8c0 AT CAM DOT ARTIMI DOT COM> Reply-To: ellenophilos AT yahoo DOT com User-Agent: slrn/0.9.8.1 (Debian) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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/