Monday, August 27, 2012

How do you get 2nd, 3rd column of 2nd, 3rd row of CSV file?


head -3  <FileName> | tail -2 | cut -d "," -f 2-3
or
cat <FileName> | sed -n '2,3p' | cut -d "," -f 2-3
or
cat <FileName> | awk 'NR==2,NR==3' | cut -d "," -f 2-3

No comments :