6 # readonly on already readonly var is harmless:
8 readonly | grep '^readonly [ab]='
13 env | grep -e^a= -e^b= # shows nothing
16 # these should all fail (despite the same value being assigned)
17 # bash does not abort even in non-interactive more (in script)
24 # in bash, assignment in export fails, but export succeeds! :)
25 # we don't mimic that!
29 #echo "^^^a is exported"
30 export -n a # undo that bashism, if it happens
34 # this fails to both set and export a:
35 a=Z env | grep '^[ab]='
36 echo "^^^a is not exported"
37 # but external command does get executed, and $? is not mangled (stays 42):
38 (exit 42); a=Z env echo Visible:$?