I need a one liner using sed, awk or perl to remove blank lines from my data file. The data in my file looks like this –
Aamir
Ravi
Arun
Rampaul
Pankaj
Amit
Bianca
These blanks are at random and appear anywhere in my data file. Can someone suggest a one-liner to remove these blank lines from my dataset.
it can be done in many ways.
e.g with awk:
or sed:
or grep: