We can remove empty lines from the output using grep in following ways -
grep
$ grep -v '^[[:space:]]*$' {FILE}
$ grep . {FILE}
This can be used to make things simple, and easy if Windows line-endings aren't concerned.
Source: StackOverFlowarrow-up-right
Last updated 1 year ago