[BRLTTY] OT: dumbduumb search question using `less'

Lee Maschmeyer leemer1 at comcast.net
Wed May 20 13:31:03 EDT 2009


Duh, hi folks,

I've got a directory containing upwards of 500 print books. I want to
check the accuracy (I'm pretty sure it is) of the rule that says in
grade 2 to spell out the string agery at the end of a word:

endword agery =

I have a script to scan all these print books for strings, so I told
it to scan for agery, piping the result through `less'. I've got 553
lines containing this string.

Most of the words are either "savagery" or "imagery". I want to search
for lines containing neither of these. How can I do it? 

I can scan for !savagery and it finds imagery, or !imagery and it
finds savagery. But I can't get the "and" in there.

I've tried to use regular expressions and would think that something
similar to:

/[^\(savagery\)]&&[^\(imagery\)]

would work, but so far I haven't hit on the right combination and I've
tried 15 or 20 or more different patterns. Any ideas?

To reduce clutter, please test suggestions to verify them. Thanks a
lot,

-- 

Lee Maschmeyer

"Never imagine yourself not to be otherwise than what it might appear
to others that what you were or might have been was not otherwise than
what you had been would have appeared to them to be otherwise."
     --Lewis Carroll



More information about the BRLTTY mailing list