perl -lane'print "$F[0] $F[-1]"' data.txt # prints the first and the last fields of a space delimited record
CSV范例:
perl -F, -lane'print "$F[0] $F[-1]"' data.csv