Reputation: 11
I want to display lines containing blank lines and special characters (?#!%#). i used grep command for special characters but its not working for blank line.
grep -n '[]?#!*%[]' file
if someone can please try this one? Thank you
Upvotes: 1
Views: 184
Reputation: 19375
You can specify multiple patterns with -e
options, so in addition to the present pattern you can give another one for lines containing nothing but blanks:
grep -n -e '[]?#!*%[]' -e '^ *$' file
Upvotes: 2