Batch File for Quick Search of NBM Log Files
Novell Cool Solutions: Tip
By Mike Murphy
Reader Rating 
|
Digg This -
Slashdot This
Posted: 8 Feb 2006 |
Problem
Mike says: "This is an add-on to a prior tip (http://www.novell.com/coolsolutions/tip/14718.html) about how to quickly search BorderManger logs. Only recently have I been able to get the commands in my tip to work in a batch file. This should really be helpful for some people."
Solution
See the Example section for contents of batch routine.
Copy the contents in to a text editor, and save it as filename GETINFO.BAT.Example
@echo off rem GETINFO.bat rem Mike Murphy echo. echo Starting.... If "%1."=="." goto doc If "%2."=="." goto doc :start echo %1 Echo %2 echo on for %%a in ( %1*.log ) do find "%2" < %%a >>%2.csv goto end :doc echo. echo. Echo variable 1 should be log file names such as 050226 (YYMMDD) echo. echo variable 2 should be SEARCH term. Names in ALL CAPS, sites in lower case echo. echo Example: echo. echo GETINFO 060131 JOHNDOE echo. echo This would find instances of JOHNDOE in the log files from 01/31/06, and write echo them in to a text file called JOHNDOE.CSV. This can be edited with echo the FIND command, a text editor, or with Excel. echo. :end echo End.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com
