I have very little experience working with bash. With that being said I need to create a bash script that takes your current directory path and saves it to a shell variable. I then need to be able to type "echo $shellvariable" and have that output the directory that I saved to that variable in the bash script. This is what I have so far.
#!/bin/bash
mypath=$(pwd)
cd $1
echo $mypath
exec bash
now when I go to command line and type "echo $mypath" it outputs nothing.

execturns that subprocess into a new interactive shell). That new shell will be missing any (non-exported) variables from the original shell (along with any special modes set in that shell). If you run the script five times, you'll wind up 5 levels deep in subprocesses. Then, as you exit those shells it'll drop back to the parent shells one level by one. This is probably not what you want.