How can I inline a command substitution in a bash parameter expansion instead of having to save the command substitution as a variable and then using that variable in the parameter expansion?
# inlined fails in bash; this works, however, in zsh
echo ${"$(ps -p $$)"##*[[:cntrl:][:punct:][:space:]]}
# separate variable works (in both bash & zsh)
p="$(ps -p $$)"
echo ${p##*[[:cntrl:][:punct:][:space:]]}