What is the easiest way to remove blank lines from multiple files at once?
I'm working on Solaris 10.
|
What is the easiest way to remove blank lines from multiple files at once? I'm working on Solaris 10. |
||||
|
|
|
A quick little script should work. I got this from nixCraft a while a go and it works quite well.
Replace |
||||
|
|
|
It'll be easiest to remove all blank lines:
This will create a backup with the extension If you want to remove lines with whitespace (and only whitespace) too, add
And this works with the
Add more whitespace characters if necessary. |
|||||||
|