Specifying a host...

Specifying a host...

Post by John F » Tue, 02 May 2000 04:00:00



How can I script in Bourne shell scripting, so that the user can specify
which servers the script can be run in?

say if I have a few servers, namely arthur, oberon, percival, etc etc...

and I want the program to be written so that the user can state as arguments
which servers this is to be run on... without the servers being in the code
itself?

 
 
 

Specifying a host...

Post by Jonathan Voig » Tue, 02 May 2000 04:00:00


$1 $2 etc etc...

use that in the script to use command line arguments.


> How can I script in Bourne shell scripting, so that the user can specify
> which servers the script can be run in?

> say if I have a few servers, namely arthur, oberon, percival, etc etc...

> and I want the program to be written so that the user can state as arguments
> which servers this is to be run on... without the servers being in the code
> itself?

--


http://www.voicomm.com
http://www.voicomm.com/jonsbox

 
 
 

Specifying a host...

Post by Real » Tue, 02 May 2000 04:00:00



Quote:> How can I script in Bourne shell scripting, so that the user can specify
> which servers the script can be run in?

> say if I have a few servers, namely arthur, oberon, percival, etc etc...

> and I want the program to be written so that the user can state as
arguments
> which servers this is to be run on... without the servers being in the
code
> itself?

I hope I understood your post correctly - here goes anyway ...
At some point you must have a list of servers on which the script can be
run. If you don't want to hard-code it in the script, then use a seperate
data-file which contains a list of server. Or try to identify "valid"
servers. For example, determine the IP-address and if the last number is
bigger than .... lets say 15, than it's not allowed. Or hostname which must
start with a letter "n". Or something like that. My guess is that a small
data-file containing the server-names is the easiest way to solve this :)

Or ..... you mean that the user can specify server-names as arguments ... ?
In that case, use the ${1} ${2} ${3} argument values. You can "shift" though
the arguments or use a for-loop.  Example;

   for server_name in ${*}
   do
      # Do something with ${server_name}
   done

Hop this helps. Good luck,
Real

 
 
 

1. ltconfig: you must specify a host type if you use '--no-verify'

Hi!

I'm trying to build my own mod_jk, so i've downloaded the source
files of jakarta-tomcat-connectors-4.0.4.

First, I'm creating the file 'configure' with
./buildconf.sh
that's seems to work.

Next, I'm trying to execute the following command:
./configure --with-apxs=/opt/apache2/bin/apxs
--with-java-home=/opt/jakarta-
tomcat-4.0.4

Then the error message:

configure: error: libtool configure failed
ltconfig: you must specify a host type if you use '--no-verify'

appears

So I've changed executed the following command:

./ltconfig ltmain.sh

which tells me my host: i686-pc-linux-gnu

Next I've tried to use this information in the previous command:

./configure --with-apxs=/opt/apache2/bin/apxs
--with-java-home=/opt/jakarta-
tomcat-4.0.4 --host=i686-pc-linux-gnu

But the same error appears...

Can anyone help me? What should I do? I know that I find thousands of
sites in the internet where a similar problem is described, but I
didn't found a solution ...

Josh

2. Virtual Login

3. how to specify trusted hosts

4. Graphical driver for Imagine 128bit card

5. Removing a specified line in etc/hosts

6. AIX C License problem even tho enrolled

7. ProFTP and specified user+host access

8. Free Programmer Available

9. How to specify Hosts to accept conections from

10. Specifying TCP port in /etc/hosts

11. Specifying host

12. the specified scripts was not running at specified time in crontab

13. How do I delete some specified month date and specified file?