rsk@pichon.colorado.edu (Rich Kulawiec) (08/03/89)
I've noticed that one some occasions ([a] tracking down something logged in the .filter-errors file and [b] trying to figure why a particular message got shoved into a particular file when it's non-obvious) that I want to answer the question: "What is rule #X?" I'm not aware of any really handy way to do that, so I wrote this csh alias: alias rule 'cat -n ~/.filter-rules | egrep " \!* " | sed -e "s/ contains//" -e "s/. save/-> /"' Usage: rule <rule-number> This relies on your machine's cat(1) having the -n flag, which causes the lines to be numbered. It's admittedly a hack, but I was starting to type "cat -n..." quite a bit... Now for the suggestion: how about a flag to filter that causes it to replicate this behavior? That is, "filter -r 17" should print rule 17. From what I can tell, most of the code is already in there, since filter writes the number of the rules it uses in the ..filterlog/.filtersum files. Cheers, Rich Kulawiec, University of Colorado at Boulder Computer Science Department rsk@boulder.colorado.edu, boulder!rsk