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