2010年4月22日 星期四

Howto: Search multiple keywords from a log file

@set WORK_DIR=%~dp0
@set GREP=D:\Tools\grep.exe
@set INPUT=%WORK_DIR%\ofcdebug.log
@set OUTPUT=%WORK_DIR%\ofcdebug_ex.log
@set KEYWORDS=%WORK_DIR%\keywords.txt
@set EXCLUDE=%WORK_DIR%\exclude.txt

%GREP% -f %KEYWORDS% -i %INPUT% | %GREP% -v -f %EXCLUDE% > %OUTPUT%


沒有留言:

張貼留言