From f1b8cf8fd6ab53c71ca54d517639fad1476f1443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Mon, 13 Jan 2014 09:16:28 +0100 Subject: [PATCH] Use 'read' built-in instead of $(cat ... | head -n1) --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index f2aaa4a..4d8b049 100644 --- a/nvm.sh +++ b/nvm.sh @@ -74,7 +74,7 @@ nvm_rc_version() { local NVMRC_PATH NVMRC_PATH="$(nvm_find_nvmrc)" if [ -e "$NVMRC_PATH" ]; then - NVM_RC_VERSION=`cat "$NVMRC_PATH" | head -n 1` + read NVM_RC_VERSION < "$NVMRC_PATH" echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>" fi }