| | #!/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 |
---|
| | |
---|
| | |
---|
| | |
---|
| | |
---|
| | |
---|
| | |