|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
sh filesFar from being a computer expert, here is what you need to know to understand my problem.
For years I worked basically in an UNIX environment. For practical reasons, I am now using Windows XP. Two years ago, I downloaded Cygwin in the hope of finding an UNIX-liek environment. That worked fine. I got to use the cygwin version of the Lilypond music notation and that too worked perfectly until the day when I found myself stuck with a 'very simple' problem' which is irrelevant to the present story. In order to solve that problem, I downloaded a more recent version of cygwin. My problem is this: From the time I started using UNIX, I have made at least a hundred different .sh files, all of which ran perfectly on my first version of cygwin. But they don't work on the new version. What do I do to make them work again? All clear and simple explanation is welcome. My computer education lasted half an hour twenty-five years ago. Thanks for your patience. dubcek |
|
|
Re: sh files-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 According to dubcek on 10/29/2006 12:59 PM: >>From the time I started using UNIX, I have made at least a hundred different > .sh files, all of which ran perfectly on my first version of cygwin. But > they don't work on the new version. What are the failure symptoms? Without any further details, my guess is that you have CRLF line endings, but a binary mount. Use the d2u program to convert your .sh files to plain LF line endings, and things should clear up. http://cygwin.com/ml/cygwin-announce/2006-10/msg00026.html - -- Life is short - so eat dessert first! Eric Blake ebb9@... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFRRuv84KuGfSFAYARAtdiAJ96mdxigxSrCNJGikpv1N/SBiLfvQCaAmRe z/b+ZVxXhG7ONhtnyPRrnsI= =HRc0 -----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/ |
|
|
RE: sh filesFrom: dubcek, Sunday, October 29, 2006 3:00 PM
> Far from being a computer expert, here is what you need to know to understand my problem. > For years I worked basically in an UNIX environment. > For practical reasons, I am now using Windows XP. Two years ago, I downloaded Cygwin in the hope of finding an UNIX-like environment. That worked fine. > I got to use the cygwin version of the Lilypond music notation and that too worked perfectly until the day when I found myself stuck with a 'very simple' problem' which is irrelevant to the present story. > In order to solve that problem, I downloaded a more recent version of cygwin. > > My problem is this: > From the time I started using UNIX, I have made at least a hundred different .sh files, all of which ran perfectly on my first version of cygwin. But they don't work on the new version. > What do I do to make them work again? > All clear and simple explanation is welcome. My computer education lasted half an hour twenty-five years ago. > Thanks for your patience. > dubcek Your problem sounds like line endings, specifically \r\n line endings on binary mounts. See <http://cygwin.com/ml/cygwin-announce/2006-09/msg00006.html> and <http://cygwin.com/ml/cygwin-announce/2006-10/msg00000.html>. The mailing list over the past month <http://cygwin.com/ml/cygwin/2006-10/> discusses ad nauseam problems resulting from the changed behavior. Look there for guidance. While we're at this, thanks to Eric for all the work he puts into bash and his other packages, and to his patience in dealing with the fallout from this change. -- 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: sh filesThanks Eric. Unfortunately, your remedy did not work. As I mentioned in my original mail, all my .sh files were made under unix. But I tried d2u anyway (you never know), but I got the same result.
Here is an example of one of my unsophisticated .sh files; it was intended to clean up after a latex session: rm *.div *.aux *.log when I run the clean.sh (this was the name I gave to it), I get the 'command not found' error reply. Does that help to make you better see my problem? Thanks. dubcek
|
|
|
Re: sh filesOn 10/30/06, dubcek <goltrock@...> wrote:
> > Thanks Eric. Unfortunately, your remedy did not work. As I mentioned in my > original mail, all my .sh files were made under unix. But I tried d2u anyway > (you never know), but I got the same result. > > Here is an example of one of my unsophisticated .sh files; it was intended > to clean up after a latex session: > rm *.div *.aux *.log > > when I run the clean.sh (this was the name I gave to it), I get the 'command > not found' error reply. Perhaps a silly question, but is clean.sh in your PATH? Try running ./clean.sh (assuming it's in your current directory) instead. Robert. -- 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: sh files> On 10/30/06, dubcek <> wrote:
> > Thanks Eric. Unfortunately, your remedy did not work. As I mentioned in my > original mail, all my .sh files were made under unix. But I tried d2u anyway > (you never know), but I got the same result. What does a hex view of your shell script say the line ending are? For example, I have a working script and my line endings are \x0A My Windows-y scripts all have \x0D\x0A You can try u2d, then d2u to see if that can clean up wonky line endings. > Here is an example of one of my unsophisticated .sh files; it was intended > to clean up after a latex session: > rm *.div *.aux *.log rm is actually in your path, yes? > when I run the clean.sh (this was the name I gave to it), I get the 'command > not found' error reply. This is the same error you get when bash doesn't understand the line endings. What sort of mount (binary vs. text) are your shells scripts on? What shell do you run? The stuff we are talking about is all bash. You may also want to observe http://cygwin.com/problems.html so you can send the appropriate attachment to the list to give folks the information they need to help you. -Jason -- 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: sh filesCould be, but I would wager his problems stem from not having the
current folder (dot) in his path... J On Mon, 2006-10-30 at 19:44 +0000, DePriest, Jason R. wrote: > From: > DePriest, Jason R. > <jrdepriest@...> > To: > cygwin@... > Subject: > Re: sh files > Date: > Mon, 30 Oct 2006 19:44:15 +0000 > (14:44 EST) > > > > On 10/30/06, dubcek <> wrote: > > > > Thanks Eric. Unfortunately, your remedy did not work. As I mentioned > in my > > original mail, all my .sh files were made under unix. But I tried > d2u anyway > > (you never know), but I got the same result. > > What does a hex view of your shell script say the line ending are? > > For example, I have a working script and my line endings are \x0A > > My Windows-y scripts all have \x0D\x0A > > You can try u2d, then d2u to see if that can clean up wonky line > endings. > > > Here is an example of one of my unsophisticated .sh files; it was > intended > > to clean up after a latex session: > > rm *.div *.aux *.log > > rm is actually in your path, yes? > > > when I run the clean.sh (this was the name I gave to it), I get the > 'command > > not found' error reply. > > This is the same error you get when bash doesn't understand the line > endings. What sort of mount (binary vs. text) are your shells scripts > on? > > What shell do you run? The stuff we are talking about is all bash. > > You may also want to observe http://cygwin.com/problems.html so you > can send the appropriate attachment to the list to give folks the > information they need to help you. -- 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: sh filesHi Eric,
Here I am again. None of the answers that I received to my query were helpful. However, suddenly I thought that I did not mention one symptom which may be related to my problem and which might help solve the problem. In my previoius cygwin version where everything worked perfectly, whenever I wanted to have access to a file, I could use the command: cd ~/ followed by the path where the file was loicated. But in the new cygwin version, the machine does not recognize the ~ directory. So, instead I know write the cd c:/ followed by the path ... (That works). But that is not the way it should be. Can you do anything with that symptom that may also solve the bash problem Thanks. dubcek
|
|
|
Re: sh files-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Please avoid http://cygwin.com/acronyms/#TOFU - reformatting accordingly. > > Eric Blake-1 wrote: > According to dubcek on 10/29/2006 12:59 PM: >>>> >From the time I started using UNIX, I have made at least a hundred >> different >>>> .sh files, all of which ran perfectly on my first version of cygwin. But >>>> they don't work on the new version. > What are the failure symptoms? Without any further details, my guess is > that you have CRLF line endings, but a binary mount. According to dubcek on 11/4/2006 6:58 AM: > Hi Eric, > Here I am again. None of the answers that I received to my query were > helpful. > However, suddenly I thought that I did not mention one symptom which may be > related to my problem and which might help solve the problem. > In my previoius cygwin version where everything worked perfectly, whenever I > wanted to have access to a file, I could use the command: > > cd ~/ followed by the path where the file was loicated. Please don't describe the problem, but show an actual screen capture (copy and paste the text, don't attach a graphical screenshot) of what you typed and what error you got. Saying it doesn't work is useless for us in figuring out why it doesn't work. Showing HOW it doesn't work is MUCH better. > > But in the new cygwin version, the machine does not recognize the ~ > directory. So, instead I know write the > cd c:/ followed by the path ... > (That works). But that is not the way it should be. Indeed. 'cd /cygdrive/c/' is better than 'cd c:/'. > > Can you do anything with that symptom that may also solve the bash problem In bash, ~/ is equivalent to "$HOME/". What is $HOME set to? Try 'echo $HOME', as well as 'printf "$HOME" | od -c', to make sure it has a sane value and that \r hasn't snuck in somewhere. If my original guess is correct, then there is still a possibility that one of your startup scripts has CRLF line endings, lives on a binary mount, and assigns the variable HOME. The default /etc/profile installed by cygwin does not change the value of HOME, but perhaps you have installed one of your own startup scripts that does so. You can use 'bash -vxli' to see a verbose listing of everything bash does at startup, to try and figure out where HOME is being reset. But until you follow directions: > Problem reports: http://cygwin.com/problems.html and include 'cygcheck -svr' output as an attachment, these are only guesses. - -- Life is short - so eat dessert first! Eric Blake ebb9@... -----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 iD8DBQFFTKEL84KuGfSFAYARAn70AKDGp289B/sBouRJSToVbsoMwuj3agCgw0E0 DD1SkwRTONHDkGapnxeXe18= =B5Ex -----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/ |
| Free embeddable forum powered by Nabble | Forum Help |