[Gllug] Dumb shell question

Simon Stewart sms at lateral.net
Mon Jan 21 11:23:50 UTC 2002


On Sat, Jan 19, 2002 at 06:49:57PM +0000, pauln at truemesh.com wrote:
> On Sat, Jan 19, 2002 at 06:44:42PM +0000, John Hearns wrote:
> > Folks,
> > I just know this question has an obvious answer, and I will
> > kick myself when someone says it.
> 
> Check for dos type line endings.
> 
> file /path/to/script
> 
> if it is a CR/LR file (you could also cat -A it, but we don't talk about
> cat do we...)

od -a or od -c ;)

> then dos2unix, recode, perl oneliner it fixed.

tr -d '\r' < input > output

> That's what it sounds like from previous similar problems to me...

You might want to check the PATH shell variable too --- root normally
includes fewer and different directories to a normal user....

Cheers,

Simon

-- 
Heavily armed, easily bored, and off my medication.

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list