You need to have the location of the script in an environment variable called PATH.
Environment variables are like normal variables you would use in your shell, except that they are persistent throughout your logged in session. Furthermore, if you set them to be loaded into your environment whenever you log in, they will always be set and available all the time.
The PATH variable helps the shell find the commands you enter. Its value is a list of directories that the shell searches every time you enter a command. The directory names are separated by colons.
If you are using the bash shell (the most common shell used in Linux), then you can see what directories are in the PATH variable by typing
echo $PATH at the command prompt.
Let's just say that the
load_info script is in a directory called
/var. You can add this additional directory to the PATH variable by typing:
To make this a permanent change to the PATH variable, you can add this to three different files depending on what effect you want.
If you add it to the
/etc/profile file, you will make the directory available to all users who log into your system.
You can add the PATH modification to your own
.bash_profile file in your home directory, and this will only apply to you when you log in.
You could also add the PATH modification to the
.bashrc file file in your home directory, which would have a similar effect to adding it to
.bash_profile, except that the
.bashrc file is loaded every time you launch a new shell.
It is also worth mentioning that
/var is probably not the best place for a script anyway.
/usr/local/bin would be better. Check out the heir(7) man page with
man 7 heir for more information on what files should go where.