After creating successful scripts, it is customary to collect them in a common script directory and change your path so that the scripts can be executed from any location.
1 > mkdir ~/bin 2 > mv myscript ~/bin 3 > vi .login In .login reset the path to add ~/bin. 4 set path = ( /usr/ucb /usr /usr/etc ~/bin . ) 5 (At command line) > source .login |
Explanation
Make a directory under your home directory called bin, or any other name you choose.
Move any error-free scripts into the bin directory. Putting buggy scripts here will just cause problems.
Go into your login file and reset the path.
The new path contains the directory ~/bin, which is where the shell will look for executable programs. Because it is near the end of the path, a system program that may have the same name as one of your scripts will be executed first.
3.145.73.207