Re: Problem with cd in Cygwin scripts
Eric Blake wrote: According to David Bishop on 12/6/2006 9:06 PM: I can manually use the cd command without problems, but when I try to use it in a script, I just get: : No such file or directory Sounds like a case of DOS line endings on a binary mount. http://cygwin.com/ml/cygwin-announce/2006-12/msg8.html That was it. Simple DOS file format. Amazing what another set of eyes can see, thanks! -- NAME: David W. Bishop INTERNET: [EMAIL PROTECTED] -- 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/
Problem with cd in Cygwin scripts
Last night I updated Cygwin, and I've had problems with my scripts afterwards. I tried on the web and found some similar issues from 2004, but with no resolutions. I am running: uname -a CYGWIN_NT-5.1 davesxp 1.5.22(0.156/4/2) 2006-11-13 17:01 i686 Cygwin I can manually use the cd command without problems, but when I try to use it in a script, I just get: : No such file or directory The top of the script that I am trying to run looks like this: #!/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? -- NAME: David W. Bishop INTERNET: [EMAIL PROTECTED] -- 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/
Problem with cd in Cygwin scripts
Last night I updated Cygwin, and I've had problems with my scripts afterwards. I looked on the web and found some similar issues from 2004, but with no resolutions. I am running: uname -a CYGWIN_NT-5.1 davesxp 1.5.22(0.156/4/2) 2006-11-13 17:01 i686 Cygwin I can manually use the cd command without problems, but when I try to use it in a script, I just get: : No such file or directory The top of the script that I am trying to run looks like this: #!/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 I am running them in a directory: /cygdrive/c/Documents and Settings/dave/My Documents/sn Which I have an sn alias to get to. Any ideas? -- NAME: David W. Bishop INTERNET: [EMAIL PROTECTED] -- 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/
Re: Problem with cd in Cygwin scripts
David Bishop wrote: Last night I updated Cygwin, and I've had problems with my scripts afterwards. I tried on the web and found some similar issues from 2004, but with no resolutions. I am running: uname -a CYGWIN_NT-5.1 davesxp 1.5.22(0.156/4/2) 2006-11-13 17:01 i686 Cygwin I can manually use the cd command without problems, but when I try to use it in a script, I just get: : No such file or directory The top of the script that I am trying to run looks like this: #!/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? Sure. First, don't send more than one copy of your report to the list. Second, read and follow the problem reporting guidelines found here: http://cygwin.com/problems.html That will give us something to go on. Two other things to try before going through all that: 1. Reboot. 2. Make sure /bin/sh.exe and /bin/bash.exe are the same size and date. If they aren't, copy /bin/bash.exe to /bin/sh.exe and try your script again. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- 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/
Re: Problem with cd in Cygwin scripts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to David Bishop on 12/6/2006 9:06 PM: I can manually use the cd command without problems, but when I try to use it in a script, I just get: : No such file or directory Sounds like a case of DOS line endings on a binary mount. http://cygwin.com/ml/cygwin-announce/2006-12/msg8.html - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFd6Un84KuGfSFAYARAud1AJ9aZwg/r9clNlr7an4pEfGV57PiHQCgkIoV llSNk1gE4LnfYq2EWaebHOc= =y1ge -END PGP SIGNATURE- -- 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/