Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

Removing ^M from your files

 Doesnt it just drive you nuts to edit a file in Windows 95 or Windows 98, and have a ^M at the end of each line ? Well with the following information, we can remove that. 

 Do the following :

'perl -i.bak -npe 's/\r\n/\n/g' <file>'

  Notes :
where <file> is the name of the file you want to "clean".
The original file is copied to <file>.bak...


  Thats all there is to it... nothing fancy.

  Article By: Rocky   rocky@ljusdal.net
 

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.