My Tech Notes
Search This Blog
sed: how to delete/skip empty/blank lines
To delete/skip the empty/blank lines:
sed '/^$/d' inputFile
To delete/skip the lines that are empty or contain only spaces:
sed '/^[[:space:]]*$/d' inputFile
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment