For a clean output on the IP address for nslookup, create a file with the list of hosts be lookup and run:
# for i in `cat /tmp/list`; do echo -n $i": " ; getent hosts $i | awk '{ print $1 }'; done
To see the memory consuption in Solaris
# vmstat 1 2 |tail -1 | awk '{ print $5/1024, "MB"}'
To run a list of commands (i.e. over SSH)
for i in `cat file.host.list` ; do ssh -o ConnectTimeout=5 $i "$(<cmd.txt)" 1>> output.out; done
Where cmd.txt contains a list of commands separated Read more...