Remove quotes from subshell call in bash script

Always no quotes for $() statement.

We don't need quotes to hold blanks in result:
 # i=$(echo 1 2 3)
 # echo $i
 1 2 3
 #

These quotes can make something wrong in some case:
 # i=$(echo '!')
 #
 # i="$(echo '!')"
 -bash: !: event not found
 #

No real problem for current code, only to use a better code style.

Change-Id: I865069a1aa0384d13feed7249cadb2f34b6cf99d
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
Zhao Lei 2015-09-23 18:45:40 +08:00
parent 9646c5aa96
commit edc2316712

View File

@ -14,7 +14,7 @@ then
fi fi
LOCAL_CONFIG=$LOCAL_CONFIG_DIR/barbican.conf LOCAL_CONFIG=$LOCAL_CONFIG_DIR/barbican.conf
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo 'DIR: '$DIR echo 'DIR: '$DIR
debug_barbican() debug_barbican()