#!/bin/sh # git/ad1810-stuff/scripts # see a1-uptime # a1-allehosts-joostvb | while read h r; do echo -n "$h --- "; ssh -n -o ConnectTimeout=2 root@$h 'cut -d\ -f1 /proc/uptime'; done | less while read h r do echo -n "$h --- " u=$(ssh -n -o ConnectTimeout=2 root@$h 'cut -d\ -f1 /proc/uptime') test $u && echo $u || echo done | \ while read h d t do test -z "$t" && t=99999999999 echo $t $h done | sort -n