I discovered, using the hex editor, that the scripts on the cdrom from
"Linux Shells by Example" terminate each line with a carrage return
followed by a line feed (hex 0d0a) combination. The lines of the
identical script entered using vi terminates each line with just the
line feed (hex 0a). The script entered using vi runs from the
command line by entering just the scriptname. The scripts from the
cdrom (lines terminated by CR/LF) do not run from the command line
directly. They do not run correctly even if invoked by saying "bash
scriptname".
How can I strip the CR (hex 0d) from the lines in the scripts from
the cdrom. Can gawk do it? It seems possible to process the file
and strip the CR characters out piping stdout to a file on the
harddisk. Can someone show me how?
Thanks in advance.
--
Geof A. Steichen
Mandrake 7.1 Linux
[EMAIL PROTECTED]