How can i get the head of file while using awk?

Hi All,

I'm a newbie here, I'm just wondering how can i get the head of my file while using awk?

input data:

nik1,nik2,nik3
nik2,nik3,nik4
nik3,nik4,nik5

expected output is:
nik1 because it is in the top and it is in the first delimeted.

i tried awk -F "," '{print $1}' but i dont know how to capture only the head.

Please advise,
Thanks,

awk -F, '{print $1;exit}' file
$ nawk -F, '{if(NR==1) {print $1}}' infile
nik1
1 Like