summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2010-12-10 17:12:50 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2010-12-10 17:12:50 +0100
commita6063692b239ca15244d2af61d05d0f773df22e9 (patch)
treefdbeb8596e8d7e4412a8c44a64224ab6a1495499 /priv
parent5bb78f619e7e186e762a3ab95dbfe6caa9f5ba15 (diff)
Use cut instead of awk to extract 1st column
Diffstat (limited to 'priv')
-rwxr-xr-xpriv/templates/simplenode.runner7
1 files changed, 3 insertions, 4 deletions
diff --git a/priv/templates/simplenode.runner b/priv/templates/simplenode.runner
index 184ee44..0fb9176 100755
--- a/priv/templates/simplenode.runner
+++ b/priv/templates/simplenode.runner
@@ -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