#!/bin/bash x=0 y=0 x_inc=467 y_inc=346 x_wrap=$(( ${x_inc} * 2 )) if [ -z "$1" ]; then hosts="w1 w2 w3 w4 w5 db1 media6 media5" else hosts="$@" fi for host in ${hosts}; do if [[ $x -gt $x_wrap ]]; then y=$(( $y + $y_inc )) x=0 fi xterm -bg black -fg white -T ${host}.curse-gaming.com -geometry 77x24+${x}+${y} -e ssh root@${host}.curse-gaming.com & x=$(( $x + $x_inc )) done