From 2d628014d05b4e57d1e2c221e9aa7dff7c94f527 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 24 May 2018 21:09:02 +0000 Subject: [PATCH] tail typo fix --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 12c1759..fb05d92 100644 --- a/install.sh +++ b/install.sh @@ -247,7 +247,7 @@ fi NODEJS_VER="${NODEJS_VER:-v}" # Search for 'v' at the least # sort -rV # will sort by version number, but it appears these are already sorted -# tail +2 # starts at line two (1-indexed) and all after (omits the csv header with 'version' and such) +# tail -n +2 # starts at line two (1-indexed) and all after (omits the csv header with 'version' and such) # cut -f 1 # gets only the first column # head -n 1 # gets only the most recent version my_char="." @@ -255,10 +255,10 @@ my_count=$(awk -F"${my_char}" '{print NF-1}' <<< "${NODEJS_VER}") # get the latest version if partial if [ $my_count -ne 2 ]; then if [ -n "$(type -p curl)" ]; then - NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | tail +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \ + NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \ || echo 'error automatically determining current node.js version' elif [ -n "$(type -p wget)" ]; then - NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | tail +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \ + NODEJS_VER=$(wget --quiet "$NODEJS_BASE_URL/dist/index.tab" -O - | tail -n +2 | cut -f 1 | grep "^$NODEJS_VER." | head -n 1) \ || echo 'error automatically determining current node.js version' else echo "Found neither 'curl' nor 'wget'. Can't Continue."