2016年5月5日 星期四

Batch file - errorlevel in Linux: $?

In Linux environment, we can use $? to get the errorlevel as DOS batch.

------------------------------------
run something here...

if [ $? -eq 0 ]
then
  echo "good"
else
  echo "bad"
fi

Python notes: Calculate delay time by WinDBG log

用WinDBG開Event Timestamps可以產生下面格式的log: Fri Sep 21 18:43:50.946 2018 (UTC + 8:00): @#$#^$@#$^ 以下python code用來找出兩個指定log中的時間差