Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to manage system-wide services' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to manage system-wide services
Authored by: wgscott on Sep 21, '03 11:21:46AM

You have to use backslash to escape the r and the n or else

you will only be replacing the letter r withthe letter n


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


I make an alias called

mac2unix

eg:

alias mac2unix "perl -pi -e 's/\r/\n/g'"

for tcsh

or

alias mac2unix="perl -pi -e 's/\r/\n/g'"

for zsh, bash, etc



[ Reply to This | # ]