[Ilugc] Shell tip : Renaming multiple files.

  • From: prataprc@xxxxxxxxx (Pratap Chakravarthy)
  • Date: Mon, 2 Jan 2012 13:25:41 +0530

Thx. Also `rename` looks to be a perl script.

On Sun, Jan 1, 2012 at 6:41 PM, Ashok Gautham <thescriptdevil at gmail.com> 
wrote:

On Wed, Dec 28, 2011 at 08:05:05AM +0530, Pratap Chakravarthy wrote:
Following is an example to rename all .css files under a directory to .tss,

$ for i in *.css; do hg mv "$i" "${i/.css}".tss ; done

You can do one better
% rename .css .tss *.css

---
Ashok Gautham
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



-- 
Pratap.

Other related posts: