Link to home
Start Free TrialLog in
Avatar of rayskelton
rayskelton

asked on

Can you include one ksh script into another?

Can you include one ksh script into another? What is the syntax?
SOLUTION
Avatar of koppcha
koppcha
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mike_mian
mike_mian

if it  has run permissions
 jsut enter the script  filename in the script you want to run it from.

ie

 
#!/usr/bin/ksh


/path/to/other/script.ksh
"include" does not work for shells, the nearest aproach to mimic this is what Tintin suggested http:#13569798
Avatar of rayskelton

ASKER

I was looking for something like a preprocessor macor in C, or C++. I have a large(2000 line) ksh script, which contains configuration information at the beginning of the script and maintained by support staff. It would be nice to pull out this header info from the main script and put in a configuration script, which would be included into the main script. The option of putting in a seperate executable file and running this file looks to be my only option.
are these "configuration parts" ksh commands?
then simply store in new file and  http:#13569798
Yes ksh
Thanks for all info