Browse Source

Use cut instead of awk to extract 1st column

pull/3/head
Tuncer Ayaz 14 years ago
parent
commit
a6063692b2
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      priv/templates/simplenode.runner

+ 3
- 4
priv/templates/simplenode.runner View File

@ -70,17 +70,16 @@ case "$1" in
Linux|Darwin|FreeBSD|DragonFly|NetBSD|OpenBSD) Linux|Darwin|FreeBSD|DragonFly|NetBSD|OpenBSD)
# PID COMMAND # PID COMMAND
PID=`ps ax -o pid= -o 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) SunOS)
# PID COMMAND # PID COMMAND
PID=`ps -ef -o pid= -o args=|\ 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*) CYGWIN*)
# UID PID PPID TTY STIME COMMAND # 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 esac
$NODETOOL stop $NODETOOL stop

Loading…
Cancel
Save