On Nov 28, 09:43:41 AM (Thursday), or Thereabouts, Rajesh wrote:
:: On Wed, Nov 27, 2002 at 04:51:56PM +0530, Sridhar M.A. wrote:
:: > >
:: >Rajesh, I meant mmv for files on linux, not for DOS. Of course, I have
:: >used it to mass rename dos files also. Works beautifully.
:: >
Don't know about mmv on debian, but here's something I got from a colleague
of mine. Works like a charm !
mmv()
{
if [ $# -lt 2 ]
then
echo "Usage: mmv .<old suffix> .<new_suffix> <File list>"
fi
local old_suffix=$1
local new_suffix=$2
shift
shift
local i=1
for i in $@
do
name=`basename $i $old_suffix`
if [ -e "$i" -a "$name" != $i ]
then
printf "%-20s -> %-30s\n" $i $name$new_suffix
mv $i $name$new_suffix
fi
done
}
Ananth
--
It's not RFC-822 compliant
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help