#!/bin/sh for f in `find $1 -name '*.rec'`; do mv "$f" `(echo "$f" | sed -e "s/rec/jpeg/")` done