Re: A file is not always what you think it is.
- To: Hans van den Boogert <hansfong@mail.geocities.com>
- Cc: debian-user@lists.debian.org
- Subject: Re: A file is not always what you think it is.
- From: Carl Mummert <mummert@cs.wcu.edu>
- Date: Mon, 19 Apr 1999 11:58:17 -0400
- Message-id: <"eRV9.A.F6B.7M1G3"@murphy>
- In-reply-to: Your message of "Mon, 19 Apr 1999 22:25:27 +0800." <3.0.32.19990419222237.00692924@mail.geocities.com>
Synopsis: file, created in Windows, won't execuate as shell script on
Linux box.
Here is an 'od' dump of the first line of the file:
> 0000000 # ! sp / b i n / s h cr nl
The trick here is to get rid of the newlines. The easiest way I know
of is to use the 'fromdos' program, located in the 'sysutils' package.
Just run
$ fromdos file
and the newlines go away.
For fun, you can run 'todos' on a working shell script -- it will stop working.
Run 'fromdos' on it -- it will start working again.
Carl
Reply to: