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

Get a value from a group of parameters... 3

Status
Not open for further replies.

ozi403

Technical User
Apr 29, 2002
54
0
0
TR
Hi,

name: working_backup_group;
start time: "3:33";
options: Manual restart;
schedule: ;
work list: ;
progress file name: ;
status: idle;

name: hacivat_bonus;
start time: "3:33";
options: Manual restart;
schedule: ;
work list: ;
progress file name: ;
status: idle;

name: anadolu_group2;
start time: "3:33";
options: Manual restart;
schedule: ;
work list: ;
progress file name: ;
status: idle;

How can I get the "name:" if "status:" is idle?
 
A starting point:
awk '$1=="name:"{n=$2}$1=="status:"{if($2~/idle/)print n}' /path/to/input

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
So helpfull,
Also I understand my awk sentence's mistakes.
thanks PHV.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top