On Thu, Jan 08, 2009 at 12:03:38PM +0200, Micha Feigin wrote: > I'm trying to fix the file suffix on some file in my directories using sed and > find but for some reason sed doesn't match the string in this manner, that is > running > find . -name "*.JPG.jpg" -execdir echo `echo '{}' | sed -e 's/\(.*\).JPG.jpg/\1.jpg/' -` \; > on a directory with > 2005_10_09-03_05_11.JPG.jpg > prints > 2005_10_09-03_05_11.JPG.jpg > instead of > 2005_10_09-03_05_11.jpg > > any idea what I'm doing wrong? > > find . -type f -exec echo `echo '{}' | tr "[:upper:]" "[:lower:]"` \; I think you will find `echo '{}' | tr "[:upper:]" "[:lower:]"` is being executed by the shell before it executes find > > also fails to convert the file to lower case for some reason (same problem, > doesn't change the case, as if it doesn't see the characters). > > Thanks > > > -- > To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org > > -- "We got the best workforce in America�in the world." - George W. Bush 12/02/2005 Washington, DC
Attachment:
signature.asc
Description: Digital signature