I understand that grep matches all the blank lines for the pattern
^$. But what does just
^ means. When I gave
grep '^' filename. It matched all the lines.
grep '' filename matched all the lines
using this regex you can find blank lines and delete/exclude blank line
It will exclude blank line and line which is start from hash ( # )