Text Processing4 / 18
Up next

awk print columns

#!/usr/bin/env bash

# $1 and $3 are the first and third whitespace fields
printf '%s\n' "alice 30 nyc" "bob 25 la" |
  awk '{print $1, $3}' 
What you're solving

select fields by position