Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rename THIS=THAT



Quoting Thomas Köhler (jean-luc@xxxxxxxxxxxxxxxxx):
> > 	rename foo.THIS THIS=THAT
> why not use this one:
> for i in *.THIS ; do mv $i `basename $i .THIS`.THAT ; done

Well, this just works for a special case - "extensions".
It won't work if "THIS" is somehere *within* the filenames.

	$ ls
	lahDIdah	DIagnose	LadyDI
	$ rename * DI=di
	$ ls
	lahdidah	diagnose	Ladydi

Well, that "rename" looks much more powerful to me.  :-)
	
Sven



Messages sorted by: Reverse Date, Date, Thread, Author