Skip to main content

BAFM

  • Home
  • Privacy Policy
  • Projects
  • About Me

Day: June 24, 2008

Removing newlines (n) with sed

June 24, 2008June 24, 2008 Christian 2 Comments

Today I had to search again on how to remove newline special characters with sed. Thanks to Kamil over at linux.dsplabs.com.au, I found it again rather quickly.

Now, this is just for my own safekeeping, so I don’t end up googling for it again … *shrug*

1
echo -e "Line containing nnewlines!" | sed ':a;N;$!ba;s/n//g'

Random Quote

No passion so effectually robs the mind of all its powers of acting and reasoning as fear.

— Edmund Burke
June 2008
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930  
« May   Jul »

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© Christian Heim and christian.weblog.heimdaheim.de, 2018. Unauthorized use and/or duplication of this material without express and written permission from this site’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Christian Heim and BAFM with appropriate and specific direction to the original content. Theme by Colorlib Powered by WordPress