diff --git a/bin/hive b/bin/hive index 0766274..e6893f9 100755 --- a/bin/hive +++ b/bin/hive @@ -169,7 +169,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 | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2); fi # Save the regex to a var to workaround quoting incompatabilities