awk:delete_consecutive_duplicate_lines
This is an old revision of the document!
AWK - Delete consecutive duplicate lines
awk 'a != $0; { a = $0 }' contents.txt
Example
- contents.txt
aaaaa bbbbb ccccc ccccc ddddd ddddd eeeee
returns:
aaaaa bbbbb ccccc ddddd ddddd eeeee
awk/delete_consecutive_duplicate_lines.1609949869.txt.gz · Last modified: 2021/01/06 16:17 by peter