Grep will go through a file and strip out a defined string. It is available for all platforms.
Dan . . . -----Original Message----- From: Kevin Bartholomew [mailto:[EMAIL PROTECTED]] Sent: Friday, August 30, 2002 3:44 PM To: [EMAIL PROTECTED] Subject: [WhatsUp Forum] Screen saver info Hello, Does anyone know how to parse an output file to strip out a string? I am new to this and frustrated. Thanks in advance!!! Kevin Robert, You found the flaw in my original solution. The down devices are passed to cmd as a space separated list of devices. Each would be picked up as %1 %2 ... The following will write the entire command line to the output file. - Create a a bat file containing this command: echo %CMDCMDLINE%>test.out - Create a Program Notification: o Program filename=yourfile.bat o Program arguments= %d %t Down Devices: %e Devices with down services: %A - Create a Recurring Notification that calls yourfile.bat. Sample Output: CMD /C "C:\Program Files\WhatsUp\test.bat" 11/26/2001 12:13:00 Down Devices: host1.com host2.com Devices with down services: host3 host5 Note: This method will write the entire command line to the output file. You will need to parse the output file to strip out the following: CMD /C "C:\Program Files\WhatsUp\test.bat" Joe Kevin Bartholomew Computer Operations Analyst 2 Freightliner Corporate 503-745-5324 [EMAIL PROTECTED] Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/ Please visit http://www.ipswitch.com/support/mailing-lists.html to be removed from this list. An Archive of this list is available at: http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/
