Came across some strange behaviour with a ksh88 ported script that uses
command substitution when setting a variable with a here-file containing
further command substitutions. For example:
ksh93$ dot=$(cat <<EOF
$(ls -d .)
EOF
)
This command hangs and requires a SIGKILL (ctrl-c or other signals do
not work) from another terminal to terminate the parent shell.
I found the following methods do work:
dot=$(cat <<EOF
${ ls -d . }
EOF
)
dot=${ cat <<EOF
$(ls -d .)
EOF
}
O/S and ksh version bug found on:
ksh93$ uname -sr ; ksh --version
SunOS 5.11
version sh (AT&T Research) 93u 2011-02-08
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers