Click to See Complete Forum and Search --> : Mysterious script failure: solved!


lldt3
01-18-2001, 01:21 PM
I was trying to run a Linux script downloaded from Microsoft.

http://www.linuxnewbie.org/ubb/rolleyes.gif (No, that is not a contradiction in terms and No, I am not suicidal) http://www.linuxnewbie.org/ubb/tongue.gif

The script is to add FrontPage Server Extensions to Apache.

The script would constantly fail, giving the same error as if I'd typed in the wrong path:

No such file or directory.

After a lot of hair-pulling and self-doubt (I am a newbie) I traced my steps, returning to the "scene of the crime".

The "crime" was downloading the original script via Internet Explorer on an NT box.

IE wouldn't simply offer to download the file. IE wanted to view it and then let you save it. I saved it as a text file. I'm pretty sure that this introduced extra hidden characters that the shell tripped over when attemping to run the script.

A subsequent download of the script straight to the Linux box in question seems to be ready to run as advertised.

- All for Now!


------------------
Alternately running RedHat 6.2/Gnome or SuSE 6.4/KDE and learning as fast as I can...

[This message has been edited by lldt3 (edited 18 January 2001).]

YaRness
01-18-2001, 02:18 PM
the infamous "^M" problem

------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/

Gotenks
01-18-2001, 02:42 PM
I tend to get that alot developing on a mac, for linux, which most of the time(I'm assuming) is viewed by windows http://www.linuxnewbie.org/ubb/wink.gif. Especially when most of our clients INSIST on sending us data in windows specific formats http://www.linuxnewbie.org/ubb/smile.gif. Gotta love perl one liners.


perl -pi~ -e 's/\r/\n/g' filename.sh


Gotenks

YaRness
01-18-2001, 03:15 PM
i'd always assumed the dos2unix and Dos2unix thingies were standard in unix/linux.. maybe it was just on our system at college. that's what they do though, strip those stupid extra EOL thingies.

thingy is the word of the day.

------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/

Gotenks
01-18-2001, 03:46 PM
Why use system commands when you could use perl? http://www.linuxnewbie.org/ubb/biggrin.gif


Gotenks

ps. Not to mention I've never seen/heard of those two programs http://www.linuxnewbie.org/ubb/wink.gif

YaRness
01-18-2001, 03:51 PM
good point.

more importantly though, especially for really good programmers (read: really lazy): why write code when someone else already did it http://www.linuxnewbie.org/ubb/biggrin.gif

------------------
"Assembly of Japanese bicycle require great peace of mind."
Registered Linux User #188285 http://counter.li.org/

jemfinch
01-18-2001, 05:51 PM
Originally posted by YaRness:
more importantly though, especially for really good programmers (read: really lazy): why write code when someone else already did it http://www.linuxnewbie.org/ubb/biggrin.gif


That was code?

Besides, that perl doesn't change a text file from DOS form to *nix form, it changes it from MacOS form to *nix form.

Jeremy