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

Multiple waitfor statements

Status
Not open for further replies.

majpooper

Technical User
Feb 5, 2005
17
US
What I really need is an "OR" function

Since I can't do waitfor "ABC" or "XYZ" <x seconds>

How do I evauate a string for multiple values.

I want to do a "waitfor" for any one of several trouble codes

Example

1323 card failure
3434 databse corruption
2323 minor error
4512 who cares
1309 nobody knows

I want to do a "waitfor" 1323 and 3424 but not the others.

I know how to test for one at a time but not two or more. I don't want to run the command twice to check for each one seperately.

Any ideas?



 
I have a sample script on my site that another user sent me awhile back that should fit the bill. It uses up to three when target command to look for three different strings, then returns which of the three (if any) was received in a specified time period. You can find it here:


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top