The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 03: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
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
s_linux s_linux is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 81
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
  #2 (permalink)  
Old 01-06-2009
jaduks's Avatar
jaduks jaduks is offline
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
s_linux s_linux is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 81
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
TheEngineer TheEngineer is offline
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
Padow Padow is offline
Registered User
  
 

Join Date: Dec 2008
Location: Maryland
Posts: 177
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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