[Ilugc] Shell tip : Renaming multiple files.
- From: mohan43u@xxxxxxxxx (MohanR)
- Date: Wed, 28 Dec 2011 10:13:20 +0530
On Wed, 2011-12-28 at 08:05 +0530, Pratap Chakravarthy wrote:
$ for i in *.css; do hg mv "$i" "${i/.css}".tss ; done
do we need 'mercury' to rename a file? Isn't this just 'mv' instead of
'hg mv'?
Above command line is specific to renaming multiple files under
'mercury'.
We can rename multiple files using another method,
$ for FILE in *.css; do mv "${FILE}" "${FILE%.css}.tss"; done
Thanks,
Mohan R
Other related posts: