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
next:
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!
1 comment:
IMHO, you can use each opereting system as a development platform today. So my comments from the past are not valid anymore... :-)
Post a Comment