how to find the nth field value in delimiter file in unix using awk

Hi All,
I wanted to find 200th field value in delimiter file using awk.?

awk '{print $200}' inputfile 

I am getting error message :-
awk: The field 200 must be in the range 0 to 199.

The source line number is 1.
The error context is
{print >>> $200 <<< }

using cut command it is working find.

cut -d "^" -f200 inputfile

how to check using awk command. pls help.

 awk '{split($0,f," ");print f[200]}' inputfile

Dear Kamaraj,
Pls suggest any links to learn usage of functions inside awk. ex:split, print etc
Regards,
Naga

Awk - A Tutorial and Introduction - by Bruce Barnett

1 Like

Thanks Kamaraj!!