Mail Archives: cygwin/2009/10/28/06:59:53
Hi,
I have just installed release 1.7 under Windows 7, 64bit. The
setup.exe program seems to have changed and you can't any longer set
the Default Text File Type to DOS/Text. I have a lot of scripts that
won't run under bash as long as the extra CR's are not removed. I know
of the tool doc2unix, however there are other obstacles too so having
the auto-conversion is the best solution for me.
After installation, I have the following drives mounted.
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=3D0,user,noumount,auto)
F: on /cygdrive/f type ntfs (binary,posix=3D0,user,noumount,auto)
R: on /cygdrive/r type ntfs (binary,posix=3D0,user,noumount,auto)
U: on /cygdrive/u type ntfs (binary,posix=3D0,user,noumount,auto)
I can, using the mount-command
$ mount -f -o text,posix=3D0 c: /cygdrive/c
change the mode to text:
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (text,user)
F: on /cygdrive/f type ntfs (binary,posix=3D0,user,noumount,auto)
R: on /cygdrive/r type ntfs (binary,posix=3D0,user,noumount,auto)
U: on /cygdrive/u type ntfs (binary,posix=3D0,user,noumount,auto)
However, this does not fix the problem and I still get the error:
$ ./foo.sh
./foo.sh: line 1: $'\r': command not found
./foo.sh: line 13: syntax error: unexpected end of file
Here is the script foo.sh:
$ cat foo.sh
# Check that the user supplied one parameter
if [ "$#" !=3D 1 ]
then
=A0 echo "You must supply one parameter:"
=A0 exit 1
fi
# We're done now
exit 0
The error says that there is an extra \r on the first empty line of the scr=
ipt.
I have also tried to use the extra argument -nocr to bash, however
that doesn't work either.
Any ideas?
Best
Niels
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -