Pages
(Move to ...)
Home
Legal
Info
HowTos
Code
Publications
Music
Finance
Links
Comics
Donate
▼
15/07/2020
[bash] Extract all distinct lines from file
Using a combination of
cut
and
uniq
, it is possible to extract all distinct lines from a given file:
cut -d\; -f1 file.txt | uniq
It is optionally possible to sort the file as well adding
sort
to the command:
cut -d\; -f1 file.txt | sort | uniq
No comments:
Post a Comment
With great power comes great responsibility
‹
›
Home
View web version
No comments:
Post a Comment
With great power comes great responsibility