diff --git bin/hive bin/hive index acc53f7..9bc3eb8 100755 --- bin/hive +++ bin/hive @@ -168,7 +168,7 @@ fi # Make sure we're using a compatible version of Hadoop if [ "x$HADOOP_VERSION" == "x" ]; then - HADOOP_VERSION=$($HADOOP version | awk '{if (NR == 1) {print $2;}}'); + HADOOP_VERSION=$($HADOOP version | sed -n 's/^Hadoop \(.*$\)/\1/p') fi # Save the regex to a var to workaround quoting incompatabilities