Skip to content

awk oneliners

awk '(NR%20==0)' data.txt
  • NF The number of fields in the current input record.
  • NR The total number of input records seen so far.
echo "truc,machin,chose" | awk -F',' '{print $NF}'