Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-10-2006, 08:58 PM   #1
LQ Newbie
Registered: May 2006
Posts: 7

Rep: Reputation: 0
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.
Old 05-10-2006, 09:12 PM   #2
Registered: Apr 2006
Location: Pittsburgh
Distribution: Debian Sid AMD64
Posts: 296

Rep: Reputation: 30
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.
Old 05-10-2006, 10:42 PM   #3
LQ Newbie
Registered: Mar 2006
Distribution: SLES 9
Posts: 7

Rep: Reputation: 0
Cool 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
Old 05-10-2006, 10:49 PM   #4
Registered: Jul 2005
Posts: 335

Rep: Reputation: Disabled
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
Old 05-10-2006, 10:54 PM   #5
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
/etc/profile would be a good place to put it.
Old 05-11-2006, 10:37 AM   #6
LQ Newbie
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script to add samba users dickohead Programming 14 11-18-2016 02:28 AM
Adding new users via Shell script coolfrog Linux - General 10 12-05-2010 10:47 AM
Shell Script: Add Users from file flobadon Programming 3 12-07-2004 03:49 PM
how to run a shell script type program redragon7964 Linux - Newbie 1 04-06-2004 02:03 AM
Shell-Script check if $xx is of type integer d-fens Programming 5 07-11-2003 08:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration