LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   a shell script edited, so all users can use it without having to type the whole path (https://www.linuxquestions.org/questions/linux-newbie-8/a-shell-script-edited-so-all-users-can-use-it-without-having-to-type-the-whole-path-443648/)

Goalswish 05-10-2006 08:58 PM

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

ataraxia 05-10-2006 09:12 PM

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.

eatranman 05-10-2006 10:42 PM

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

Dralnu 05-10-2006 10:49 PM

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 :)

nadroj 05-10-2006 10:54 PM

/etc/profile would be a good place to put it.

Goalswish 05-11-2006 10:37 AM

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.