For thos who are not familiar with awk, but still want a quick and easy way of removing blank lines from a flat ascii file, remember that the use of 'cat' in conjuction with 'grep' is just as effective.
$ cat file1 | grep -v '^$' >file2
$ mv -f file2 file1
$ cat file1 | grep -v '^$' >file2
$ mv -f file2 file1
No comments:
Post a Comment