#!/bin/sh # ~jhs/bin/.sh/xterms # if [ "`basename $0`" = "xconsoles" ]; then # next=xconsolev # else # }{ # next=xtermv # fi # } case `basename $0` in #{ "xterms") #{ hosts=`~jhs/private/bin/.sh/hosts` # # with path, else .xsession calling xauth.sh complains # to .xsession-errors # /home/jhs/bin/.sh/xterms: hosts: hosts: not found command=xtermv # .xsession-errors: /home/jhs/bin/.sh/xterms: xtermv: not found command=/home/jhs/bin/.sh/xtermv ;; "xloads") #{ hosts=`~jhs/private/bin/.sh/hosts` command=xloadv ;; "xconsoles") #{ hosts=`~jhs/private/bin/.sh/hosts` command=xconsolev ;; "xpingscoax") #{ hosts="axis erik film flip king lapa lapd mini rain scan snow test" # For physical order see ~/bin/.csh/host2coax command=xpingvcoax ;; "xpingsall") #{ hosts="axis `~jhs/private/bin/.sh/hosts`" command=xpingvall ;; "netstats") hosts="mart.ext park.ext `~jhs/private/bin/.sh/hosts`" # hosts="$hosts mart.tun park.tun" command=xnetstatv ;; *) echo "$0 Not a recognised name" ;; esac # } for i in $hosts ; do #pre 2013-1123: $command $i ping -c 1 `basename $i .ext` && $command $i & # '&' is so later hosts dont wait ages to be called, just because # some earlier host is turned off. The '&' also loads host # with a temporary burst of processes, but its a lot nicer than # having 'xterms' litter the display with a load of xterms that # only later time out & go away. & it much improves the situation # with 'netstats' when oherwise it would need about 30 mouse clicks to # place all those 80x24 full size xterms. done case `basename $0` in #{ "xterms") #{ ;; "xconsoles") #{ ;; "xpingscoax") #{ # Pull up an editor to review physical order # while debugging cable. vi ~/bin/.csh/host2coax ;; "xpingsall") #{ ;; "netstats") #{ ;; "xloads") #{ ;; *) echo "$0 Not a recognised name" ;; esac # }