📄 generic.sh
字号:
#! /bin/sh# Trace an application, listing events with optional parameters (thread name# and NPTL object name). Compare this list with a reference file.PROG=$1; shiftCOLUMNS=$1; shift# trace name: trace is keeping if an error occuredRES=$PROG.errorTMP=$PROG.tmp# 2 possible reference filesREF=ref/$PROG.refREF2=ref/$PROG.ref2./init.shPTT_TRACE=./ptt_tracePTT_VIEW=../src/decode/ptt_view$PTT_TRACE -n trace prog/$PROG > /dev/null$PTT_VIEW -a alias $@ trace.bin > $TMPif [ $COLUMNS -eq 0 ]; thenawk '{if (NR > 7) print $3}' $TMP > $RESfiif [ $COLUMNS -eq 1 ]; thenawk '{if (NR > 7) print $3,$7}' $TMP > $RESfiif [ $COLUMNS -eq 2 ]; thenawk '{if (NR > 7) print $3,$7,$9}' $TMP > $RESfi# if ($RES != $REF) and ($RES != $REF2) then error else okif [ "`diff $RES $REF`" != "" ]; then if [ ! -f $REF2 ]; then rm -f alias trace.bin $TMP $PTT_TRACE exit 1 fi if [ "`diff $RES $REF2`" != "" ]; then rm -f alias trace.bin $TMP $PTT_TRACE exit 1 fifirm -f alias trace.bin $TMP $PTT_TRACE $RESexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -