User Tools

Site Tools


sed:delete:delete_duplicate_nonconsecutive_lines_from_a_file

SED - Delete - Delete duplicate, nonconsecutive lines from a file

WARNING: Beware not to overflow the buffer size of the hold space, or else use GNU sed.

sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P'
sed/delete/delete_duplicate_nonconsecutive_lines_from_a_file.txt · Last modified: 2020/08/17 09:07 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki