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 off, you need to remove the quotes:
bashboy@host:~$ myFolder=~/Files/Scripts/Main
The quotes prevent the shell from expanding the tilde to its special meaning of being your $HOME directory.
You could then use $myFolder an environment a shell variable:
bashboy@host:~$ cd $myFolder
bashboy@host:~/Files/Scripts/Main$
To make an alias, you need to define the alias:
alias myfolder="cd $myFolder"
You can then treat this sort of like a command:
bashboy@host:~$ myFolder
bashboy@host:~/Files/Scripts/Main$