command to print the last field
Hi,
Is there a way to extract the last field? Specifying the field number is causing problems using awk or cut as the input log file has the output specified in different lines at different places/fields. The only thing constant is the 'pathname' which always occurs at the end, which is what I want Thanks a lot D |
Hi,
Is this what you are looking for: awk '{ print $NF }' infile NF is special in awk, it tells you how many fields there are, using it as $NF will print the last field. Hope this helps. |
Quote:
Thanks a lot...it helps |
You're welcome :)
If this is issue is fixed, could you put up the solved flag (First post -> Thread Tools)? |
All times are GMT -5. The time now is 04:08 PM. |