Re: [SLUG] better way to consolidate shell commands

From: Levi Bard (levi@bard.sytes.net)
Date: Thu Aug 19 2004 - 15:36:38 EDT


---------
#!/bin/sh
# Prints out a string showing what commands would be run if a command
# (given as command line argument) were to be run on every machine in a
given range via ssh

i=0
max=123

while test "$i" -lt "${max}"
do
        echo "exec ssh user@192.168.3.$i \"$@\""
        i=`expr "$i" + 1`
done
---------

There are good sh references you can find just by googling. I've also
found the bash manpage helpful.
-----------------------------------------------------------------------
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 - 15:00:38 EDT