
Exporting means making the value of the variable available to a shell spawned (created) by the current shell.
There are two ways to export
export myvar="value string"myvar="value string" ; export myvar (; ⇒ export myvar can be on new line as well)Variables created in one shell are not passed automatically to subshell


<aside> 💡 NOTE: Modifying value of var in subshell does not change the value of var in parent shell
</aside>
echo $myvar