I tried grep -v \'^$\' in Linux and that didn\'t work. This file came from a Windows file system.
grep -v \'^$\'
Do lines in the file have whitespace characters?
If so then
grep "\S" file.txt
Otherwise
grep . file.txt
Answer obtained from: https://serverfault.com/a/688789