[awk] Skip the rest of the current record with next

Created on November 30, 2026

Use next to stop processing the current record and move to the next one. Here, NR == 1 triggers next for the header, so {print $1} only runs on the data rows.

printf 'name score\nTaro 80\nHanako 90\n' | awk 'NR == 1 {next} {print $1}'
Taro
Hanako
awk Shell command