Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 355 Bytes

File metadata and controls

19 lines (12 loc) · 355 Bytes

Remove Empty Lines

We can remove empty lines from the output using grep in following ways -

Option 1

grep -v '^[[:space:]]*$' {FILE}

Option 2

grep . {FILE}

This can be used to make things simple, and easy if Windows line-endings aren't concerned.

Source: StackOverFlow