X-Spam-Check-By: sourceware.org Subject: Re: Problem with cd in Cygwin scripts In-Reply-To: From David Bishop at "Dec 6, 2006 10:54:28 pm" To: cygwin AT cygwin DOT com Date: Thu, 7 Dec 2006 01:42:34 -0700 (MST) CC: Jim Easton X-Mailer: ELM [version 2.4ME+ PL66 (25)] Message-Id: <20061207084235.63FAF56511@erskine.cs.ualberta.ca> From: jim AT cs DOT ualberta DOT ca (Jim Easton) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Hi, Wed, 06 Dec 2006 David Bishop wrote: > #!/bin/sh > # > rm -f putfile > echo "put supernova.html" > putfile > # Check the sn2006 directory > cd sn2006 > down=0 > ..... > cd ../sn2005 > > Manually, all of these cd commands work, but when I put them in a script > I only get errors. I run the script with: > . /home/dave/scripts/buildput > > Any ideas? Just before the cd sn2006 put in: ls pwd This will tell you where you are. If sn2006 appears in the ls listing direct it to a file and look for non-printing characters, in particular . Also look for s in the script. HTH Jim -- 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/