in reply to How can I remove 0 from first line and empty space from the start of the following line and join them

perl -i.bak -n0e 's/0\s+(.*)\n\s+(.*)/$1 $2/g&&print' file

This, a combination of BrowserUk's correct method and Enlil's short method, should do what you want in one line.

-sauoq
"My two cents aren't worth a dime.";
  • Comment on Re: How can I remove 0 from first line and empty space from the start of the following line and join them
  • Download Code