Tuesday, February 8, 2011

remove empty line by sed or in vim

In vim, following the same trick for general sustitution:
:%s/^[\ \t]*\n//g 

By sed on the command line:
cat orgfile | sed /^$/d

No comments:

Post a Comment