export a variable in shell script code example Example: export variable bash $ export MYVAR=1729 $ echo $MYVAR 1729