little thing I found usefull

Trent Piepho (xyzzy@u.washington.edu)
Fri, 9 May 1997 18:07:57 -0700 (PDT)


I'm logging the output of deschal so I can see its progress and so I'll know
if I find they key. But the output has all these annoying ..... in it, it
takes up extra disk space. When using the fork option for my SMP machine
the output is even messier than normal. So I wrote this little proglet
to filter out all the annoying '.'s and newlines:

main() { char a,b; for(;;){
if(!read(0,&a,1))exit();
if(a!='.') if(a=='\n') {
if(!read(0,&b,1))exit();
if(b!='.'){ write(1,&a,1); write(1,&b,1);}
} else write(1,&a,1); }}

I know it isn't pretty...

So now I pipe the output into a log file:

nice deschall keymaster.verser.frii.com 2 | a.out > log &

and watch it in my xconsole.

tail -f log > /dev/console

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason |
|came to be, how it begun \ all alone in the family of the sun |
|curiosity teasing everyone \ on our home, third stone from the sun. |
|Trent Piepho (xyzzy@u.washington.edu) -- Metallica |