The UNIX and Linux Forums  

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
Find the geographical location within a shell script eamani_sun Shell Programming and Scripting 1 05-13-2008 07:27 AM
excutable script to copy a file to a different location. nazehcalil UNIX for Dummies Questions & Answers 4 12-21-2006 05:17 AM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-14-2006 08:57 PM
executing a remote location script from local server srivsn Shell Programming and Scripting 2 02-28-2006 11:16 AM
shell script location w/ Panther ropers OS X (Apple) 2 02-26-2004 10:38 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2007
Registered User
 

Join Date: Oct 2006
Posts: 4
Calling a script from another location

Hi, I am a newbie in scripting and would appreciate your help...
I have a shell script under a filesystem /softtoys/bunny/192.293.32.146/bbdp/bin

script is called bluebunny.sh

When I run the script from under the above mentioned filesystem, the script works fine.

I want the script to be portable enough that I can call it from the home directory, which is /privatedir/trus

I read some tips in relative path etc. but don't understand all this too much. I am still an intern and learning. Please guide...
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-17-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
1. put directory containing script on path.

2. use fully qualified path to script when calling.

3. put link in a directory on the path to that script.
Reply With Quote
  #3 (permalink)  
Old 10-17-2007
Registered User
 

Join Date: Oct 2006
Posts: 4
Can you pls. put that giving an example. I am a slow learner...
Reply With Quote
  #4 (permalink)  
Old 10-17-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Do you know about environment variables?

try this "echo $PATH"

that is a list of directories separated by a colon which are searched when looking for a program to run.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0