Removing Blank Lines

Hi
i have the below lines from a file

                                                                     7538

PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
7538
7538
7538
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036

PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036
PRGRP450800PERSONAL SOAP AND BATH ADDITIV 7036

I want to remove the BLANK lines from this file. I am reading a file of size atleast 1 GB.

So kindly let me know which would be the best way to quickly reduce the processing time when removing the blanks.

If you can give me an example that would also be fine.

Regards
Dhana

You could run the following command:

sed '/^$/d' < file1 > file2

file2 is the one without blank lines.

some of the version of sed allows '-i' switch to do in place. It saves the output in the same file.

sed 's/^$//g' filename>newfile

or in grep...

I just don't know the performance if tested against a very large file..