#!/bin/sh # renext - Mass File Rename By "Extension" # Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA # All Rights Reserved # $Id: renext,v 1.102 2006/02/09 00:56:42 root Exp $ if [ $# != 2 ] then echo "usage: renext oldext newext" echo " Renames files ending with '.oldext' to end with '.newext'" else for f in *.${1} do tgt=`echo $f | sed s/\.$1$/\.$2/` echo $f $tgt done fi