I'm trying to create a shell script that sets an environment variable and then calls another shell script which gets that environment variable. The following code is my attempt, but it's not producing the desired result...
scriptOne.sh
export MYVAR=blob
bash ./scriptTwo.sh
scriptTwo.sh
#!/bin/bash
# SIMPLE
printenv MYVAR <<END
ls || pwd && ls
ls || ls | wc || pwd && ls
END
echo
printenvdo?