awk (nawk) field separator

Hi;
i have a file and i want to get;

  • If the last word in line 14 is NOT equal to "Set."; then print 2nd, 3rd, 4th and 5th values of 3rd line.

and my code is:

nawk 'NR==14 {if ($NF!="Set.") (NR==3{print $2,$3,$4,$5}) }' file.txt

but no result?? :confused::(:confused::frowning:

Where's the field separator (and value...) for awk?

---------- Post updated at 15:23 ---------- Previous update was at 15:16 ----------

Could it be

 awk -f" " 

missing?

tried but still same :frowning:

How about:

nawk 'NR==14 && $NF!="Set."{print p} NR==3{p=$2 FS $3 FS $4 FS $5}' infile

thx Scrutinizer. you have again a perfect solution :slight_smile: