Pattern: Use of invalid ${$x}
Issue: -
ShellCheck found a parameter expansion ${..}
where the first element was a second parameter expansion, either ${$x..}
or ${${x}..}
. This is not valid.
Example of incorrect code:
# Expecting $RETRIES or 3 if unset
retries=${$RETRIES:-3}
The extra $
was unintentional and should simply be deleted.
Example of correct code:
retries=${RETRIES:-3}