greycat 1599165199 learn Variables marked readonly (declare -r) are intended to be used with a restricted shell, to stop you from trivially changing PATH to escape the restrictions (etc.). They were never intended to be wudely used in scripts. If you try, you will see odd results (-r at a global scope is passed down to local scopes). Soliton 1610625850 forget Soliton 1610625853 learn Variables marked readonly (declare -r) are intended to be used with a restricted shell, to stop you from trivially changing PATH to escape the restrictions (etc.). They were never intended to be widely used in scripts. If you try, you will see odd results (-r at a global scope is passed down to local scopes). emanuele6 1708666391 forget emanuele6 1708666444 learn Variables marked readonly (declare -r) are intended to be used with a restricted shell, to stop you from trivially changing PATH to escape the restrictions (etc.). They were never intended to be widely used in scripts. Global readonly variables cannot be shadowed by local variables.