![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to add new paths to $PATH | wrapster | SUN Solaris | 2 | 06-01-2008 04:46 AM |
| Spoofing a From Address in SMTP | jimthompson | UNIX for Dummies Questions & Answers | 1 | 02-28-2008 06:48 AM |
| create paths | alias47 | UNIX for Dummies Questions & Answers | 4 | 08-07-2007 09:14 AM |
| Paths update | phpote | UNIX for Dummies Questions & Answers | 5 | 07-25-2001 07:57 AM |
| paths | caiohn | UNIX for Dummies Questions & Answers | 1 | 01-17-2001 07:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Spoofing paths.
There is a program that I am trying to run on a shell account. It depends on another program, which I have also copied to the shell account. Both are in my home directory, yet the first program has a different path hardcoded into it, which I cannot use because of permissions problems.
How can I trick the first program into running the second one from a different path? Last edited by fahadsadah; 12-25-2007 at 04:47 AM.. Reason: typo |
|
||||
|
modify PATH
Try modifying the PATH variable. if you are calling script2 from script1 like this
Code:
$> cat script1.sh #!/bin/ksh export PATH=/some/user/dir script2.sh args Code:
$> cat script1.sh #!/bin/ksh script2.sh args Code:
$> export PATH=.:$PATH $> which script2.sh -->check if this is pointing to the correct script $> script1.sh --> this should call the required script2.sh |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|