On 2002-09-19 01:38, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> Tonight I surprised myself by running
> `find ~/Desktop/folder/ -name "*.jpg" -exec mv {} ~/Desktop/folderjpgs/ \;`
> But there were two issues -- I had to escape the semicolon with a "\" --
> does this ever cause problems for find command lines?
The `\' character makes sure that your shell doesn't intepret ';' in
the usual sense (as a command separator).
> Second, this found only *.jpg files and left behind *.JPG files so
> how do you make find be case-insensitive? -exec ThankYouScript.sh {} \;
Two ways. a) Use -iname instead of -name.
b) Use filename globbing, as in:
find folder/ -name '*.[mM][pP]3'
The character classes [mm] and [pP] make sure that both variations of
each character are considered valid matches. This is my preferred way
of matching files when I only want to ignore the case of one or two
characters.
--
Giorgos Keramidas <keramida@{ceid.upatras.gr,freebsd.org}>
FreeBSD 4.6-RELEASE #0: Wed Sep 18 23:08:01 EEST 2002
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message