OT? Bash Script

Jason Dixon jason at dixongroup.net
Thu Sep 1 03:01:36 UTC 2005


On Aug 31, 2005, at 10:54 PM, Lokrin wrote:

> Well, I don't even know where to start.  If you can point me to the  
> right command I could probably google more...
>
> Anyway, I have a directory with several subdirectories in it.  I  
> want to change file names in several ways.
>
> 1) lower-case everything
> 2) strip out spaces and special characters.
> 3) make jpg, jpeg, jpe, etc.. all into jpg
>
> And make sure that nothing collides, such as name.jpg and  
> name.gif.  They have to have different names because of another  
> program that makes jpg thumbnails of all images.  If necessary I'm  
> willing to rename all the files to something like Image0001.jpg,  
> image0002.gif, image0003.gif, etc..  And, if possible, do hidden  
> folders and files also.
>
> Anyway, if anyone can get me started I'd appreciate it.

Pick up a copy of Learning Perl and get to reading.  This is simple  
enough, but you want to learn it... not have someone do it for you,  
right?

--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net






More information about the redhat-list mailing list