Finding the last column value from a text file

Hi,

I need to find out the last column value from a text file which is delimited by a tab.

The issue here is the last column# for each record can be different i.,e, 1st record can have the last column as 15 and the second record can have the last column as "17".

I have to search a string based on the last column of every record.

Regards
Naveen

read AWK document, and understand the meaning of $NF

C:\cygwin\tmp>echo 15,16,9,4,3,22 | gawk -F',' '{print $NF}'
22

C:\cygwin\tmp>echo 15,16,9,4,3,22,49 | gawk -F',' '{print $NF}'
49

To make it easier to see/understand, I used a comma delimiter. You can program for other delimiters like tab, as appropriate.

thanks a lot...