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 Message-ID: <003d01c25325$8cd3a090$0100a8c0@wdg.uk.ibm.com> From: "Max Bowsher" To: , References: <20020903030623 DOT 2413C586E AT ivory DOT research DOT canon DOT com DOT au> Subject: Re: How do you write scripts with portable filenames? Date: Tue, 3 Sep 2002 09:35:49 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 luke DOT kendall AT cisra DOT canon DOT com DOT au wrote: > "Portable" between Cygwin and Unix systems, that is. I'm thinking of > the problems caused in particular by command filenames having > extensions on Windows and none on Unix. > > E.g. if I say "ls x", where X.EXE exists, ls will output x (as long as > nocaseglob is set). But "strings x" fails because the file x doesn't > exist. > > Is my goal of writing portable shell scripts doomed? Am I going to > have to say "strings x.exe"? :-( > > Is there any cool Cygwin magic to help with this, like there is in > U/Win? I _was_ pretty sure that this was supposed to 'just work'. (And it does with mv, but not with rm). I guess this is a bug. I think you might be at least temporarily stuck with using `uname` to find out if you are on cygwin, and setting and using an EXEEXT variable throughout the script. Max. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/