sed:delete:delete_duplicate_consecutive_lines_from_a_file
SED - Delete - Delete duplicate, consecutive lines from a file
Emulates “uniq”.
First line in a set of duplicate lines is kept, rest are deleted.
sed '$!N; /^\(.*\)\n\1$/!P; D'
sed/delete/delete_duplicate_consecutive_lines_from_a_file.txt · Last modified: 2020/08/17 09:06 by 192.168.1.1