#!/bin/sh for server in `finger @scripts.mit.edu | tail -n +5 | sed -n "s/ -> \([^:]*\):.*/\1/p" | sort -u`; do ssh "$server" "$@" done