Permalink
Browse files

Use 'read' built-in instead of $(cat ... | head -n1)

  • Loading branch information...
1 parent 78ff9a2 commit f1b8cf8fd6ab53c71ca54d517639fad1476f1443 @dolmen dolmen committed with ljharb Jan 13, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 nvm.sh
View
2 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
}

0 comments on commit f1b8cf8

Please sign in to comment.