Say I have a script where I have exported a variable as seen below:#!/bin/bashfoo(){    eval export one=1}foo1(){    eval export two=2}(foo)foo1echo one=$oneecho two=$twoHowever I got the following output:root@centos1:~>/tmp/test.shone=two=2 What might be reason that I am unable to see value of $one and can see $two?
Scope of an exported variable in shell
shell;variable;subshell