[font=Verdana]There are many ways to achieve this and they should work on all unixes:[/font]
[font=Verdana]With grep:[/font]
gz@shell~$ grep -v '^[[:space:]]*$'
gz@shell~$ grep -v ‘^$’ file
gz@shell~$ grep ‘.’ file
[font=Verdana]With awk:[/font]
gz@shell~$ awk '{ if (length($0) > 0){ print $0 }}'
gz@shell~$ awk NF file
gz@shell~$ awk ‘/./’ file
[font=Verdana]With sed:[/font]
gz@shell~$ sed ‘/^$/d’ file
gz@shell~$ sed -n ‘/^$/!p’ file
[font=Verdana]Know more? Leave a message :)[/font]