Quote:
Originally Posted by kickarzt
How to run a bashscript no matter where u stand in the directory?
|
May be by keeping the script in /usr/bin/ directory, Provided /usr/bin path added in PATH environment variable and you have root privileges.
OR
Add path of the directory where the scripts exists to PATH environment variable
Better set PATH variable in ~/.bash_profile.
Code:
$PATH=$PATH:/usr/bin:/your/directory/where/script/present
export $PATH
Now execute
Code:
source ~/.bash_profile