[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linux Bash chokes on Cygwin Scripts (bad interpreter)
From: |
"Sandy McPherson" <allset_bv <at> yahoo |
Subject: |
Linux Bash chokes on Cygwin Scripts (bad interpreter) |
Date: |
Thu, 6 Jun 2002 18:15:53 +0200 |
I have several scripts developed for bash on cygwin. When I try and run them
in the version of bash for RedHat 7.2 (2.0.5-8), the shell chokes on the
carriage return character. Luckily I had an old awk script to disinfect the
files and remove the carriage return.
However,,,,, I don't remember having this problem with RedHat 6.1 (does
anyone remember the version). It would seem to be the shell directives like
do,if,#!bin/sh which are not working.
If you do
sh script
The script will run correctly, but somehow
script
chokes on the
#!/bin/sh^M
it looks for a file called /bin/sh^M and not /bin/sh.
Why does the Linux version not handle the DOS format files? Is there a patch
to fix this. Looks like this is a common problem people have run up against.
I have written wrapper scripts for my java programs which I thought were
portable and they appear to have been until I upgraded my linux.
Thanks in advance
Sandy
- Linux Bash chokes on Cygwin Scripts (bad interpreter),
"Sandy McPherson" <allset_bv <at> yahoo <=