oddity with find -exec grep -i
From: Chris Evans (chris_at_psyctc.org)
Date: 10/31/04
- Previous message: Jerome BENOIT: "Re: helix"
- Next in thread: Thomas Adam: "Re: oddity with find -exec grep -i"
- Reply: Thomas Adam: "Re: oddity with find -exec grep -i"
- Maybe reply: Mirek Stefanski: "Re: oddity with find -exec grep -i"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: debian-user@lists.debian.org Date: Sun, 31 Oct 2004 12:24:25 -0000
Perhaps I am looking straight through things, if so, I'm sorry. I
have effectively a one liner shell script that I want to run to see
if any text (typically an Email address) is in any file named "users"
in any directory below a particular directory, easy I thought:
#!/bin/bash
/usr/bin/find /usr/lib/ecartis/lists/ -name users -print \
-exec grep --ignore-case "$1" {} \; | grep -B 1 "$1"
That little file works fine (the original has the second line all in
one but seemed best to break it for this post). The only thing is
that whether I put "--ignore-case" or "-i" it doesn't ignore case. I
have a "David.hardy" in one file. If I search for that it finds it
perfectly, but if I put "david.hardy", it doesn't. I've looked at
man and info and books and I give up and throw myself to the tender
mercies of the many gurus of this list! What am I doing wrong?!
Running Debian stable uname -r:
2.4.18-1-k6
uname -m
i586
bash:
2.05a.0(1)-release (i386-pc-linux-gnu)
TIA
Chris
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Jerome BENOIT: "Re: helix"
- Next in thread: Thomas Adam: "Re: oddity with find -exec grep -i"
- Reply: Thomas Adam: "Re: oddity with find -exec grep -i"
- Maybe reply: Mirek Stefanski: "Re: oddity with find -exec grep -i"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]