![]() |
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 |
| 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 |
| problem with shell script execution | anju | Shell Programming and Scripting | 2 | 05-08-2008 01:50 AM |
| Sequential execution in shell script? | chengwei | UNIX for Dummies Questions & Answers | 6 | 03-30-2007 12:10 AM |
| Scheduling the execution of a shell script | sumesh.abraham | Shell Programming and Scripting | 1 | 12-06-2006 07:25 AM |
| Logging OWB mapping execution in Shell script | npn | Shell Programming and Scripting | 1 | 11-16-2006 09:25 AM |
| Please help on shell scripts execution | duke0001 | Shell Programming and Scripting | 13 | 09-20-2006 03:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Quote:
Make sure the script to be called is executable and has the appropriate #! on the first line, then call it by giving the path to the script. Code:
#!/bin/sh # # script1.sh # # /path/to/script2/script2.sh |
|
|||||
|
Quote:
Quote:
./path/to/script2/script2.sh Would that make a difference ? vino |
|
|||||
|
Only if the path to script2.sh is relative to the current working directory at the time that call is made.
for example, the full path to script2.sh is /home/someuser/bin/script2.sh if the current working directory at the time script2 is called is say /home/someuser then you could call script2.sh by doing ./bin/script2.sh, however if you used ./home/someuser/bin/script2.sh is would not work becuase in log form that is saying run /home/someuser/home/someuser/bin/script2.sh which does not exist. . /home/someuser/bin/script2.sh however is different, and that would execute the script in the current shell. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|