In my .sh file, I have this, cp $file $SOME_PATH, while $SOME_PATH is exported as export SOME_PATH=\"~/path/to/path/\". But when I ran this .sh fil
cp $file $SOME_PATH
export SOME_PATH=\"~/path/to/path/\"
Remove the quotation marks on your export:
export SOME_PATH=~/path/to/path/
use
SOME_PATH=~/path/to/path/
if you path have spaces, quote it
SOME_PATH=~/"path with spaces"