Skip to content

18_Text Processing

Davood Dorostkar edited this page Feb 6, 2024 · 2 revisions

awk

delete all repeated lines in a file, unless it is a newline:

awk 'NF == 0 || !seen[$0]++' input_file > output_file
Clone this wiki locally