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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable field column output search

Status
Not open for further replies.

raffs

Technical User
Joined
Apr 28, 2003
Messages
1
Location
AU
I have a field separated list of variables embedded with an ksh script i.e

VX_VOL="vol01 vol02 vol03 vol04"

VX_VOL02="vol05 vol06"


how can display the last field column, since the variable list is variable in length ?

I can't grep the $4 or $2 since the variable list could be 1 or 100 in length.

Any help much appreciated.

Raffs
 
echo ${VX_VOL} | nawk '{print $NF}'

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top