a shell script edited, so all users can use it without having to type the whole path
I am working on a project, and I need to have a shell script edited, so all users can use it without having to type the whole path -- just the script name.
I think i have to put the PATH in the script ,but am lost as to how. Any Info will be greatly appreciated. Thanks |
Nothing you can do inside the script will accomplish this. You need to find (or make) someplace which is in all users' paths, and put the script there. /usr/local/bin is commonly used for this purpose.
|
shell scripts for everyone
you may have to give file ownership to a the group user. its a guess
send me a email wwe can talk |
Make the script where ever you want to, then in the users .bashrc or whatever file it is for aliases in shell, add in an alias. Works for me :)
|
/etc/profile would be a good place to put it.
|
Thanks everone.
What i did was copy the file into root/bin and it worked. cp /home/Happy/bin/file /bin (from root) Thanks again |
All times are GMT -5. The time now is 08:01 PM. |