From: Ford, Phillip (phillip.ford@SPCORP.COM)
Date: Fri Aug 23 2002 - 09:45:53 EDT
Why not something like this for the find statement:
find /somedirectory -print | grep -i "${i}"
-- Phillip Ford Senior Software Specialist Corporate Computer Center Schering-Plough Corp. (901) 320-4462 (901) 320-4856 FAX phillip.ford@spcorp.com -----Original Message----- From: cbaker@GOODYEAR.COM [mailto:cbaker@GOODYEAR.COM] Sent: Friday, August 23, 2002 8:29 AM To: aix-l@Princeton.EDU Subject: find of ANY case Is there an easy way to search for files containing some sub-string, but not caring if the hit has upper, lower or mixed case letters of the sub-string. If I do: for i in `cat some_word.lst` do echo ${i} find /somedir -name "*${i}*" -print echo "" done I will find all files with the word from the list of words, but not if the case does not match. I can use "tr" and get two (or three) words per iteration that I can plug into the find with "or" statements, but I will still not get mixed case matches. Is there something like a "grep -i" option? I don't think so. What about some OpenSource or PERL "enhanced-find" command? Thanks, Christopher M. Baker Senior Technical Support Analyst DSE/TCO Goodyear Tire and Rubber Company ================================================= Contains Confidential and/or Proprietary Information. May not be copied or disseminated without the expressed written consent of The Goodyear Tire & Rubber Company. ================================================= *************************************************************** This message and any attachments is solely for the intended recipient. If you are not the intended recipient, disclosure, copying, use, or distribution of the information included in this message is prohibited -- please immediately and permanently delete this message.
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:10 EDT