Use cut instead of awk to extract 1st column

This commit is contained in:
Tuncer Ayaz 2010-12-10 17:12:50 +01:00
parent 5bb78f619e
commit a6063692b2

View file

@ -70,17 +70,16 @@ case "$1" in
Linux|Darwin|FreeBSD|DragonFly|NetBSD|OpenBSD)
# PID COMMAND
PID=`ps ax -o pid= -o command=|\
grep "$RUNNER_BASE_DIR/.*/[b]eam"|awk '{print $1}'`
grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f1`
;;
SunOS)
# PID COMMAND
PID=`ps -ef -o pid= -o args=|\
grep "$RUNNER_BASE_DIR/.*/[b]eam"|awk '{print $1}'`
grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f1`
;;
CYGWIN*)
# UID PID PPID TTY STIME COMMAND
PID=`ps -efW|grep "$RUNNER_BASE_DIR/.*/[b]eam"|\
awk '{print $2}'`
PID=`ps -efW|grep "$RUNNER_BASE_DIR/.*/[b]eam"|cut -d' ' -f1`
;;
esac
$NODETOOL stop