export variable from bash script code example Example: export variable bash $ export MYVAR=1729 $ echo $MYVAR 1729