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

SED Question

Status
Not open for further replies.

beaster

Technical User
Aug 20, 2001
225
US
I have the printout below which may have many lines in it.


===================================================================================
Proxy Adm State Op. State MO
===================================================================================
22697 1 (UNLOCKED) 0 (DISABLED) RncFunction=1,UtranCell=UVA11021A31
31145 1 (UNLOCKED) 0 (DISABLED) RncFunction=1,UtranCell=UVA11021A21
40578 1 (UNLOCKED) 0 (DISABLED) RncFunction=1,UtranCell=UVA11021A11
===================================================================================

I want to use sed to read file VARNC001.log and output to a new file VARNC001.txt so I only see the info below. Any help would be great guys/gals!

UVA11021A31
UVA11021A21
UVA11021A11


 
Why not using awk ?
awk -F= 'NF>1{print $NF}' VARNC001.log > VARNC001.txt

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for the help! I also was able to get what I wanted with:

nawk '{gsub(/^[^:]*l=/,"");print}' input.file > output-file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top