#!/bin/bash for a in $(cat $1 | egrep -o '^[^ ]*'); do echo -n "$a " ssh -o ConnectTimeout=5 $a "cat /proc/cpuinfo | egrep '^processor' | wc -l" done