[NTLUG:Discuss] scratching head
Carl Haddick
sysmail at glade.net
Fri Feb 28 10:43:30 CST 2003
> >Ah - that makes more sense...but it's still going to search non-text
> >files when the filename contains the string 'text'...which will result
> >in some interesting issues in some cases.
> >
First, many thanks to all who have contributed to this discussion. If
you can motivate this many brain cells over a curious sig, we are
clearly an unstoppable force. Kneel before us, mortals...
To skip non-text files that contain the string 'text', how about:
find . -type f | \
xargs file | \
grep -i "^.*:".*text" | \
cut -f1 -d: | \
xargs grep "hello"
I understand there are some intense patent struggles out there these
days, so I wish to completely disclose that the prior pipeline is a
derivitive work, not original art. I further assume that the GPL in
effect on portions of the above pipline (including, but not limited to,
'|' in bash, find, file, xargs, grep, and cut) covers my derivitive
research.
With humility to the giants on whose shoulders I stand,
Carl
PS - Oh, no! I used backslash line continuation in a PUBLIC POST!
Doesn't Microsoft own the backslash?!? How could I have been so stupid!
--
Carl Haddick http://www.glade.net
GladeNet Communications alt email: support at glade.net
200 South Red River (254) 562-6381
Mexia, TX 76667 (877) 373-3882
More information about the Discuss
mailing list