This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem with cd in Cygwin scripts
- From: jim at cs dot ualberta dot ca (Jim Easton)
- To: cygwin at cygwin dot com
- Cc: Jim Easton <jim at cs dot ualberta dot ca>
- Date: Thu, 7 Dec 2006 01:42:34 -0700 (MST)
- Subject: Re: Problem with cd in Cygwin scripts
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
<CR>. Also look for <CR>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/