I tried to make an \"alias\" for a path that I use often while shell scripting. I tried something, but it failed:
myFold=\"~/Files/Scripts/Main\"
cd myFold
First, you need the $ to access "myFold"'s value to make the code in the question work:
cd "$myFold"
To simplify this you create an alias in ~/.bashrc:
alias cdmain='cd ~/Files/Scripts/Main'
Don't forget to source the .bashrc once to make the alias become available in the current bash session:
source ~/.bashrc
Now you can change to the folder using:
cdmain