Hands-on task
This task is step 9 of the course “awk and datamash: reports from tables”
awk: unique lines, preserving order
In /root/items.txt lines are repeated. Write the unique lines to /root/uniq.txt, preserving the order of the first appearance of each.
Reference:awk
What you'll practise:
- awk
- associative array
- post-increment
- deduplication
- preserving order