Current time: 06-26-2024, 09:33 PM Hello There, Guest! (LoginRegister)


Post Reply 
nightly update script won´t work
Author Message
ut2k3 Offline


Posts: 4
Joined: Aug 2009
Reputation: 0
Post: #2
RE: nightly update script won´t work
Remove all ^M from the file. This problem occurs maybe if you paste from windows to putty or something like this.

====

To remove the ^M characters at the end of all lines in vi, use:

:%s/^V^M//g

The ^v is a CONTROL-V character and ^m is a CONTROL-M. When you type this, it will look like this:

:%s/^M//g

In UNIX, you can escape a control character by preceeding it with a CONTROL-V. The :%s is a basic search and replace command in vi. It tells vi to replace the regular expression between the first and second slashes (^M) with the text between the second and third slashes (nothing in this case). The g at the end directs vi to search and replace globally (all occurrences).

Other way is to use the tool - hm the name was dos2unix i think
(This post was last modified: 09-01-2009 10:48 PM by ut2k3.)
09-01-2009 10:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: nightly update script won´t work - ut2k3 - 09-01-2009 10:44 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)