|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
beginner help: ksh triggering another ksh
all I'm trying to do is trigger one ksh within another ksh if c:/data/file.txt is not an empty file.
what I have in my script1 right now is: if [ -s c:/data/file.txt ]; then script2.ksh argument fi What is the correct way to call a script within a script? do I need to source the script first? |
|
#2
|
|||
|
|||
|
That's an odd filesystem name - c:
Code:
if [ -s c:/data/file.txt ]; then /path/to/script2.ksh argument fi |
|
#3
|
|||
|
|||
|
so I don't need to source the script2.ksh in the begining?
|
|
#4
|
|||
|
|||
|
The only reason to source scripts is in the event it is going to make changes to environment variables or to some other envionment component. Changes you want to keep in the "main", calling process.
For example, when you login /etc/profile is sourced, so are .profile scripts. These define variables like PATH. |
|
#5
|
|||
|
|||
|
Quote:
thanks for your help |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > beginner help: ksh triggering another ksh |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|