Remove blank lines from file with grep
$ grep . filename