Running scripts from home

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Running scripts from home
# 1  
Old 12-07-2007
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  
Old 12-07-2007
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/ /usr/B/
ln -s /usr/A/ /usr/C/

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  
Old 12-07-2007
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Running scripts in bash

So I've written my first bash script.I wanted to run it from the command line, but I got an error: $ command not found So instead I try this and it works: $ ./ Is this how I will always need to execute it? How can I run without having to... (2 Replies)
Discussion started by: P.K
2 Replies

2. Solaris

running scripts from cron

I need to run a script (from cron) that runs a second script. What worries me is that second script, when run from bash, upon finishing doesn't return to bash unless I press the 'Enter' key. I presume that's because last command in that script ends with & Could that be a problem for cron?... (2 Replies)
Discussion started by: orange47
2 Replies

3. Shell Programming and Scripting

Running 2 scripts one after the other using cron

I would like to run two scripts using cron one immediately after the other. Is it enough to put them one after another in the cron file to run at the same time, or will this cause them to run concurrently? (4 Replies)
Discussion started by: 3210
4 Replies

4. Shell Programming and Scripting

Running scripts within scripts from cron

Hi all, I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so. 0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/ >> /u01/home/weblogic/logs/checkstatus.log The scripts looks like this. ... (4 Replies)
Discussion started by: sirbrian
4 Replies

5. Shell Programming and Scripting

Running scripts via su

Hi All, Am using the below command to start my application using the root user su - bin -c "/home/bin/test/" but am getting the error becaue i have set some environment varibales in bin .profile when i execute the command by logging directly into bin account it's... (8 Replies)
Discussion started by: ravi.sri24
8 Replies

6. Shell Programming and Scripting

Running scripts unattended

Hi guys just wondering how i could make one of my scripts run unattended without the use of cron? (3 Replies)
Discussion started by: musicmancanora
3 Replies

7. Solaris

running sshd server from home directory without root access

Hi, I managed to install openssh from source on my home directory on a server I don't have root access to. I had problems with privilege separation because of permissions initially so I disabled it in sshd_config. But when I run sshd from where I installed it by doing ~/local/sbin/sshd, nothing at... (0 Replies)
Discussion started by: sayeo
0 Replies

8. Shell Programming and Scripting

running multiple scripts

Hi all I have a requirement where I have a flow like Script1 script2 Script3 Script 4 Script 5 Script 6 script7 where script2 to script6 will... (3 Replies)
Discussion started by: nvuradi
3 Replies

9. UNIX for Dummies Questions & Answers

scripts running under different users

what command can i use to tell if a script is running under different users? (1 Reply)
Discussion started by: csnewbie
1 Replies

10. Shell Programming and Scripting

get home-directory in shell-scripts

Hi, does somebody know, how i can get the full path of my home-directory in a shell-script? But not with the $home-variable or ~ (i don't know for sure, but i think this does not work in every shell...). Thank You! Greetings, qsi (5 Replies)
Discussion started by: qsi
5 Replies
Login or Register to Ask a Question