#! /bin/sh # usage: do_local_bell [count: def. 1] count=${1:-1} host=`hostname -s` locals="chimera gargoyle unicorn" use_bell=1 for l in $locals ; do if [ $host = $l ]; then use_bell=0 fi done for n in `seq 1 $count` ; do if [ $use_bell = 1 ]; then echo  else aplay /home/$USER/Sounds/doorbell.wav fi done