#! /bin/sh files=`ls {*.html}.tmp` for file in ${files}; do newfile=`echo $file | awk -F} '{print$1}' | awk -F{ '{print$2}'` mv $file $newfile done