#!/bin/bash for file in /srv/repos/hg/*; do if [ -d $file ]; then echo $file cd $file; hg pull -u fi done