How to let bash subshell to inherit parent’s set options?

export SHELLOPTS

for example:

echo date > b
chmod +x b

without the export, we only see the commands in ./a when it calls ./b:

$ echo ./b > a
$ bash -xv a

./a
+ ./b
Sun Dec 29 21:34:14 EST 2013

but if we export SHELLOPTS, we see the commands in ./a and ./b

$ echo "export SHELLOPTS; ./b" > a
$ bash -xv a

./a
+ ./b  date
++ date   
Sun Dec 29 21:34:36 EST 2013

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)