Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I awk just number.number from this output?

Status
Not open for further replies.

linuxMaestro

Instructor
Jan 12, 2004
183
US
rlog passwd | grep revision | awk {'print $2'}
gives me:
revisions:
1.9
1.8
1.7
1.6
1.5
1.4
1.3
1.2
1.1
revision

I want it to only show the numbers, not revisions: or revision
 
rlog passwd | awk '/revision/{if($2!~"revision")print $2}'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top