SED New Line

Ever needed to use ‘sed’ to exchange new lines for another character? Here’s a way to do it:

sed ':a;N;$!ba;s/\n/ /g'
  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter
No Responses to “SED New Line”

Post a Comment