Hands-on task
Remove duplicates, preserve order
/root/emails.txt has a list of addresses with duplicates. Create /root/unique.txt, where each address appears once, and the order matches the first occurrences in the source file (a plain sort -u won't do — it breaks the order).
- awk
- associative arrays
- deduplication
- pipeline
- redirection