I have a txt document with many empty lines. How can I remove the empty lines in perl and Vi in linux.
In perl from command line I tried this: perl -ni -e "s/^n//" sample.txt - this is not working.
Also can any one help me in getting solutoion f this in VI editor and perl from command line.,
2) in Linux in VI how can I get ^M charcter printed so that I can use s/^M// t replace empty liness