I have text files with tons of empty lines, how do I get rid of those in one second?
|
For html or php files that I'll post on the net, I like to get rid of empty lines. Usually, they are leftovers of search and replace and I have never been able to get any of the replace functions of the editors I use to get rid of them. Now, sed is your friend... Written a long time ago for Unix systems, sed has been ported to a variety of operating systems, including Linux. It's is a non-interactive editor that works from a command line, with no GUI, so you do not waste time opening up windows, and clicking all over the place. So, open up a konsole (Figure 1) and move into the directory where your file resides ( |
|
|
Here is what happens:
Now, you may have 100 html files to correct at the same time. That's where
|
