1#!/bin/sh 2 3base=`basename $0` 4 5echo "1..2" 6 7exp_pid="$(ps ax | grep '\[idle\]' | awk '{print $1}')" 8 9name="pgrep -S" 10pid=`pgrep -Sx idle` 11if [ "$pid" = "$exp_pid" ]; then 12 echo "ok 1 - $name" 13else 14 echo "not ok 1 - $name" 15fi 16pid=`pgrep -x idle` 17if [ "$pid" != "$exp_pid" ]; then 18 echo "ok 2 - $name" 19else 20 echo "not ok 2 - $name" 21fi 22