Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 455
  • Last Modified:

Can you include one ksh script into another?

Can you include one ksh script into another? What is the syntax?
2 Solutions
include in the sense .Do you want to call one KSH script from another
then make the other ksh script which you want to call as executable and then just give the path of it in the first ksh script.
by doing this you can also pass paramters to the second kornshell script.In the second korn shell script you can access it like $1,$2...so on.
Let me nkow if this is what you are looking for..if not let me know why you want to include?i mean what you are trying to do?
. /path/to/other/script.ksh
if it  has run permissions
 jsut enter the script  filename in the script you want to run it from.



Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

"include" does not work for shells, the nearest aproach to mimic this is what Tintin suggested http:#13569798
rayskeltonAuthor Commented:
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
rayskeltonAuthor Commented:
Yes ksh
rayskeltonAuthor Commented:
Thanks for all info

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now