Re: [SLUG] Shell script calling shell script

From: Chad Perrin (perrin@apotheon.com)
Date: Thu Nov 18 2004 - 22:02:41 EST


Chuck Hast wrote:
> I have a set of applications that I want to configure and start up. I am
> seeing that the general way it is done is to write the monolithic shell
> script that sets up ports, starts apps, etc. What I really want to do is
> have a master script that calls modular scripts that will then set up
> a port or start a app, then if I need to go in and change something I
> do not need to poke around the master script only go in and work on
> the port script that I want to change.
>
> My question is if my main script calls another one, when that one
> finishes, will it hand the execution back to the script that called it?
> That way say I have a machine that has 8 ports on it, each port has
> about 10 lines of configuration, if I want to remove a port I just go in
> and comment out the line that calls that port, I do not have to go in
> and comment out 8-10 lines of commands and parameters. If I want
> to add a port I just take a template and change the parameters are
> are port dependient and make a entry in the main script that calls
> it.
>
>

I'm afraid I don't know the answer to that, but this looks like a job
for Perl (or maybe Ruby, if that's more to your taste).

--
Chad
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:40:24 EDT