(You could read the "line", "shell", and "regular expression" parts later.)
You could create a folder at anywhere (better if under your home directory) with any name you like (usually "bin") to create your own shell commands. After creating the folder, add this line to ~/.profile.local(create it if it doesn't exist) :
PATH=$PATH:~/bin
Then put your own scripts to the folder (~/bin here) and after logging out and re-logging in, you would be able to run any commands under the folder from anywhere.