The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing the values to the secondary script when it invoked by primary script venu_eie UNIX for Advanced & Expert Users 2 07-03-2008 07:10 AM
Passing the values to the secondary script when it invoked by primary script venu_eie Shell Programming and Scripting 1 07-03-2008 06:16 AM
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-26-2008 02:50 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 02:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 03:06 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Aug 2008
Posts: 42
How can I let other to run the script

Hi All,

I just wrote a small script called "test", put it in /home/bin and added to the path to run the script from anywhere. presently Im running this as a root. Then i logged in as my account and tried to run the script as i did with root. but it gave me command not found. if i type ./test then it works.

any ideas. Thanks
Sponsored Links
  #2 (permalink)  
Old 01-06-2009
jaduks's Avatar
Registered User
 

Join Date: Aug 2007
Location: Assam,India
Posts: 166
Is the PATH for your account is also includes "/home/bin" (as you did for root)?
  #3 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Aug 2008
Posts: 42
Thanks for your reply...

If i have 100 users, do i need go to each user account and add path?
  #4 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Apr 2006
Location: Iraq
Posts: 36
Hello

You can include the /home/bin to the PATH variable defined inside /etc/profile and that will be applied to all users on your system.
  #5 (permalink)  
Old 01-06-2009
Registered User
 

Join Date: Dec 2008
Location: Maryland
Posts: 136
The proper place for this type of change is /etc/kshrc or /etc/bashrc or whichever shell you are using. While login shells will apply the settings in /etc/profile, subshells may not. Using the kshrc or similar files will ensure that each shell receives that PATH change.
Google The UNIX and Linux Forums
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 04:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66