我有这样的管道:
command1 | command2
有没有办法同时跟踪两个命令?
在这些情况下,Bash 不会在通配符中执行分词:
var=$value # simple variable
declare -A hash
key="key with a space"
hash[$key]=$value # index of an associative array
arr=$(echo "1 2 3") # word splitting does happen here
[[ ]]
var="one two"
if [[ $var = *" "* ]]; then ... # check if var has a space in it
if [[ $(echo "one two") = $var ]]; then # use the output of command substitution to compare with var
(( ))
((sum = $(echo "99 + 1"))) # assigns 100 to sum
cat <<< * # gives '*' as the output
是否有明确的 Bash 执行或不执行分词和通配的情况列表?