-export dstat=0
-export bstat=0
-export rstat=0
-
-if grep -q 'dir: BeforeJob: run command "/bin/echo RunBeforeJob"' tmp/RUN_ALL_OK.log &&
- grep -q 'fd: ClientRunBeforeJob: ClientRunBeforeJob' tmp/RUN_ALL_OK.log &&
- grep -q 'fd: ClientAfterJob: run command "/bin/echo ClientRunAfterJob' tmp/RUN_ALL_OK.log &&
- grep -q 'dir: AfterJob: run command "/bin/echo RunAfterJob' tmp/RUN_ALL_OK.log
+dstat=0
+bstat=0
+rstat=0
+export dstat
+export bstat
+export rstat
+
+grep 'shell command: run BeforeJob "/bin/echo RunBeforeJob"' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null
+a=$?
+grep 'ClientRunBeforeJob: ClientRunBeforeJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null
+b=$?
+grep 'shell command: run ClientAfterJob "/bin/echo ClientRunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null
+c=$?
+grep 'shell command: run AfterJob "/bin/echo RunAfterJob' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null
+d=$?
+grep 'ClientRunBefore1' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null && \
+grep 'ClientRunBefore2' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null && \
+grep 'ClientRunBefore3' ${cwd}/tmp/RUN_ALL_OK.log >/dev/null
+e=$?
+
+if [ $a = 0 -a $b = 0 -a $c = 0 -a $d = 0 -a $e = 0 ]