First complete script.
1 parent 586ab9e commit f0340a3ce3b6e68a367d216814848e07dd2576c1
@root root authored on 8 Feb 2006
Showing 1 changed file
View
34
renext
#!/bin/sh
# renext - Mass Rename Of Files By "Extension"
# renext - Mass File Rename By "Extension"
# Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved
# $Id: renext,v 1.1 2006/02/08 23:56:52 root Exp $
# $Id: renext,v 1.101 2006/02/09 00:13:13 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