1

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

1 Answers1

2

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
Armali
  • 18,255
  • 14
  • 57
  • 171