User Tools

Site Tools


sed:delete:delete_trailing_blank_lines_at_end_of_file

SED - Delete - Delete trailing blank lines at end of file

sed -e :a -e '/^\n*$/{$d;N;ba' -e '}'  # works on all seds
sed -e :a -e '/^\n*$/N;/\n$/ba'        # ditto, except for gsed 3.02*
sed/delete/delete_trailing_blank_lines_at_end_of_file.txt · Last modified: 2020/08/17 09:56 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki