Sed convert multiline whitespace to single newline


/ Published in: Bash
Save to your folder(s)

Converts whitespace that spans multiple lines into a single newline, needs improvement


Copy this code and paste it in your HTML
  1. $ cat filename |sed '/^[\t ]*$/{
  2. N
  3. /^\n[\t ]*$/d
  4. }'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.