> >
> > Hello Know-It-Alls,
> >
> > If I have a directory with a whole slew of files with the same file
> > extension, for example:
> >
> > 1-1-1.inc
> > 1-1-2.inc
> > 1-1-3.inc
> > etc.
> >
> > What command can I use to change the file extension - but keep the
file
> > name the same - in one swell swoop? The equivalent command in
Windows
> > would be:
> >
> > C:\>ren *.inc *.htm
> >
> > Jonas Fornander - System Administrator
> > Netwood Communications,LLC - www.netwood.net
> > Find out why we're better - 310-442-1530
> >
> >
> from an sh type shell
> for i in *.inc
> do
> z=`echo $i | sed -e "s/inc/htm/g"`
> mv ${i} ${z}
> done
> 
> (not tested, but should work.)
> 
> LER


Tested and it works great!

Thanks.

Jonas Fornander - System Administrator
Netwood Communications,LLC - www.netwood.net
Find out why we're better - 310-442-1530


_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to