[plug] Does anyone know how to change bulk filenames...

Bevan Broun bevanb at ee.uwa.edu.au
Mon Jul 13 11:10:25 WST 1998

On Mon, Jul 13, 1998 at 11:02:17AM +0800, Matt Kemner wrote:
> try:
> for FILE in *.txt
> do
> mv $FILE `echo $FILE|sed 's,\.txt$,\.doc'`
> done

This also how I do such things and its a very useful bit of scripting on
the commandline. Matt should have added that this is only for bourne
shell compatable shells. Wont work for tcsh, csh.

It gets really nice when you replace "in *.txt" with "in `SOME GOOD

Bevan Broun                                           ph (08) 9380 1587
Computer Systems Officer                             fax (08) 9380 1065
Dept. Electrical and Electronic Engineering      
University of Western Australia                                 rm. G70

More information about the plug mailing list