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

extracting strings from a file

Status
Not open for further replies.

gatetec

MIS
Joined
Mar 22, 2007
Messages
420
Location
US
I have a file called node1.scp that has the contents as shown below.

What I need to pull out from the lines is:

i.e.

[67] instances=2
[69] instances=1
[70] instances=1

in two columns as shown above.

thx so much for your help.


.... bla ....

[67]
description=CPM Async Script Class 001
instances=2
restart=Y

[67.aix-rs6000]
path=cer_exe/srv_drvr
parameters=cer_exe/cpm_srvscripta

[67.prop.aix-rs6000]
binding=CpmScriptAsync001
DependencyGroup=1
SSC Binding=async001
startup script=procare
User Name=d_prod

[69]
description=CPM Generic Cache Manager
instances=1
restart=Y

[69.aix-rs6000]
path=cer_exe/cpm_srvgenericcache
parameters=

[69.prop.aix-rs6000]
DependencyGroup=1
User Name=d_prod

[70]
description=CPM Audit Server
instances=1
restart=Y

...... bla ....
 
post the perl code you have written so far to try and solve your problem.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top