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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Automatically Running Scripts jeffreydavisjr UNIX for Dummies Questions & Answers 4 11-19-2008 05:05 AM
running sshd server from home directory without root access sayeo SUN Solaris 0 03-13-2008 04:53 PM
scripts running under different users csnewbie UNIX for Dummies Questions & Answers 1 02-14-2007 04:52 PM
Running scripts parallely santho UNIX for Dummies Questions & Answers 4 07-23-2006 12:42 PM
get home-directory in shell-scripts qsi Shell Programming and Scripting 5 06-18-2005 10:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-07-2007
mastachef mastachef is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 21
Running scripts from home

I have created a Bourne shell script that helps with metric counting and it has to be run in a ClearCase view. It has been placed in a directory where if User A cd'd to it and runs it, a bunch of errors occur. Because this is a tool that several users would want access to and the program assumes that it is being run from User A's home directory, I have a couple of questions:

a) is there a way to create a script where User A can run the script from their home directory and have the results stored in their home directory?

b) what other solutions would be easier to accomplish this task.

Any help is appreciated. Thanks.
  #2 (permalink)  
Old 12-07-2007
ramkrix ramkrix is offline
Registered User
  
 

Join Date: Dec 2007
Location: TamilNadu,INDIA
Posts: 52
Use Soft link concept:

lets assume /usr is a directory having all the list of 3 the users A,B,C
And you are user "A" created a script and you want other users to execute the same without logging your directory.

ln -s /usr/A/file.sh /usr/B/file.sh
ln -s /usr/A/file.sh /usr/C/file.sh

Soft links are applicable for both files and directories.

(like shortcut in windows)

Hope my soln will wrk out. Plz reply me whether it has worked out or not?
  #3 (permalink)  
Old 12-07-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,209
Why not just fix the script so that it can be run from anywhere and outputs into the directory of whichever user runs it?

If a script ( as it should ) sets up it's envirnmant correctly and uses absolute paths, it should not matter where it is run from.
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 10:42 PM.


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