Script Woes


craigletheren

Still Fresh
Joined
Feb 9, 2008
Messages
48
Hi all,

I'm having some difficulties with some scripts, in particular the one that initialises my wireless dongle. The script works fine, until I make some small change to it, then it renders it totally useless. I'm certain it's not syntax because once it happened when I modified a comment line that was in there. No syntax was changed, just one of the comments within the script which would not have effected the execution of the script.

I'm fairly certain that this is to do with the format of the text file. What format should the text be in? I'm using editors within linux (vi, gedit and scite). Once the script stops working I cannot seem to recover it without a re-type - very strange! Can anyone help please?

Thanks,

CR
 
vi should be fine. It's normally only Windows-based editors that screw up the file.

You could 'hexdump' the file before and after to confirm the changes. Probably the best way to diagnose the problem.
 
in vi you can ":set list" to get a reading of the control characters in your script. You only want EOL ($) chatacters and not CRLF (^M) anywhere.
 
If the version of vi you are using is based on vim and it's got dos endings, you'll get [dos] on the status line.

do

Code:
:se ff=unix

to change it to unix
 
Back
Top