Results 1 to 3 of 3
Hi.
I want to get the last term of an unknown-sized text line, by usig the awk command.
Is there any variable which points to the last term of a ...
- 01-05-2011 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 2
ksh - awk
Hi.
I want to get the last term of an unknown-sized text line, by usig the awk command.
Is there any variable which points to the last term of a text line ?
(obviously, y can obtain that term if i knew how many terms does the line have... i.e. awk '{print $12}' ; if we are talking about a 12-terms text line)
I wonder if there is an option like $?, to get the last term.
Thanks in advance
- 01-05-2011 #2
Hi, try
Code:awk '{ print $(NF) }'Refining Linux Advent calendar: “24 Outstanding ZSH Gems”
- 01-05-2011 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 2
thk a lot


Reply With Quote