Re: rename v. script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2005-05-20 at 09:36 +0800, Matt Arnilo S. Baluyos (Mailing
Lists) wrote:
> On 5/20/05, THUFIR HAWAT <hawat.thufir@xxxxxxxxx> wrote:
> > this seems to be the briefest and most common solution.  thanks for
> > the addition tip, snipped, for just changing files which begin with a
> > digit, which I will file away.
> 
> very useful discussion here.
> 
> how about different ways of renaming *.JPG files to *.jpg? (i.e.
> change to the file extension to lowercase while retaining the file
> name)

Not exactly the answer I know, but consider variations on this:
find . -type f | while read f 
do nf=$(echo $f | tr '[A-Z]' '[a-z]')
  mv $f $nf
done

to muck around with the bit JPG only, a variation of the above usng sed
will do nicely. You could also make them all .jpeg.

To impress/confound folk at the local LUG you can mung names by ROT13-
encoding the names. Repeating the transformation undoes the "damage."



-- 
John <debian@xxxxxxxxxxxxxxxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux