*** empty log message ***
1 parent bf0e591 commit 1ff2846567515ef1066708eb70698fb22cc72e21
@toor toor authored on 23 Aug 2006
Showing 1 changed file
View
32
ren 0 → 100755
#!/bin/sh
# renext - Mass File Rename
# Copyright (c) 2006, TundraWare Inc., Des Plaines, IL USA
# All Rights Reserved. Non-Commercial Use Hereby Permitted.
 
RCSID="$Id: ren,v 0.101 2006/08/23 21:02:25 toor Exp $"
 
 
arg=""
 
if [ $1_ = -v_ ]
then
arg=$1
shift
fi
 
if [ $# != 2 ]
then
echo "usage: ren [-v] oldstring newstring"
echo " Renames filenames containing 'oldstring' replacing with 'newstring'"
 
else
for f in `ls -a 2>/dev/null`
do
tgt=`echo $f | sed s/${1}/${2}/`
if [ $f != $tgt ]
then
mv ${arg} $f $tgt
fi
done
fi