cat out.txt | grep ERRORWell, as I'm doing Windows programming now, I recently found out that it's possible after all! Incredible but true! Hovever the syntax is somehow different:
type out.txt | findstr ERROROn things like that I see how fast the time is passing! A couple of years before, I'd never believe that Windows would ever catch on. I think, the tide change came with XP.
But wait, it comes even better! Here's a script for checking if a process is running and killing it if so:
tasklist /FI "IMAGENAME eq myProcess.exe" | findstr myProcess.exeEven a sleep is possible (athough it's arguably very ugly):
if ERRORLEVEL 1 GOTO next
echo "-- kill running myProcess"
taskkill /F /IM myProcess.exe
echo "-- starting the XXX process"
@ping 127.0.0.1 -n 2 -w 1000 > nul
And here (in the IT-Dojo) you can see that the Windows command promtp has some interesting history mechanisms!