bash - How to run a script everywhere in linux -


i have script host_avai.sh in /home/campus27/zwang10/bin. , in .bashrc, add export path=$path:/home/zwang10/bin/host_avai.sh. after type host_avai.sh, shows host_avai.sh: command not found.. can me here?

added

$ echo $shell /bin/tcsh 

your path should path=$path:/home/zwang10/bin , add in .bash_profile. after run script following command :

$ . .bash_profile 

make sure host_avai.sh must have execute permission.

$ cd  /home/zwang10/bin $ chmod +x host_avai.sh 

now run command anywhere.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -