#!/usr/bin/awk -f # Downloadable example 2 for GNU Awk Part 14 BEGIN { cmd = "sort -u | nl" } NR > 1 { print $1 | cmd } END { close(cmd) }