Troubles with bash scripts (NBY)

Earnie Boyd earnie_boyd@hotmail.com
Thu Jan 29 04:47:00 GMT 1998


You need to remove the \r from the line endings.
Use:

cp scriptfile junk
tr -d "\r" < junk > scriptfile
rm junk

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/           (ftp site)
http://www.cygnus.com/pubs/gnupro/                   (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                (Project Page)
http://www.cygnus.com/ml/gnu-win32                   (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/    (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html        (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports)
http://www.bestweb.net/~aka/gnu-win32/  (GNU-Win32 Bash Configuration)

>From: "=?iso-8859-1?Q?Jean-Paul_Le_F=E8vre?=" <Le_Fevre@rungis.cisi.fr>
>To: <gnu-win32@cygnus.com>
>Subject: Troubles with bash scripts
>Date: Wed, 28 Jan 1998 09:56:17 -0800
>
>
>I'm having difficulties with my shell scripts : some characters
>of the statements are swallowed :
>Considering the most simple script (say 'foo') used to figure out the 
ori=
>gin
>of the bugs :
>       set -vx
>       ls
>       echo what ?
>
>If I launch it in a DOS window by typing  'bash foo', I got :
>      ls
>      +ls
>      list of my files ...
>      cho what ?
>      + cho what ?
>      foo: cho: command not found.
>
>The first e of echo is crunched. Inserting a space at the beginning
>of the line fixes the error. In more complexe scripts, I cannot
>afford to add lot of white spaces on every lines.
>
>On the other hand if I start an interactive bash in a DOS window
>and if I execute directly the script 'foo' it works fine.
>
>Help would be appreciated. Thank you !
>
>_________________________________________________________________________=
>___
>Jean-Paul Le F=E8vre                      Tel  : (33) [0]1 41 80 44 57
> http://www.mygale.org/03/lefevre  Mail : LeFevre@rungis.cisi.fr
>
>
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>
>



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list