#!/bin/bash if [ ! -f "$1" ]; then echo "error: must specify rooms file" exit 1 fi NUM=0 for HOST in `cat "$1"`; do >&2 echo stopping host $HOST ssh pi@$HOST "screen -X quit" done