input -->
% cat file
11:30
12:20
13:10
unexpected output
-->
% awk '{FS=":";print $1}' file
11:30
12
13
expected output
-->
% awk '??' file
11
12
13
Please suggest what's wrong with the command. Thanks in advance.
Also consider,
% awk '{ if(NR>1) {FS=":";print $1} }' file
12:20
13
It is as if awk has decided not to work on 1st row of input supplied !!