grep atoms generated*/gilu/log | grep residues
to
grep -m 1 atoms generated*/gilu/log | grep residues
to
grep -m1 "atoms.*residues" generated*/gilu/log
the first one did what i needed it to do. it got me the lines
that said
3375/3152 atoms 323/323.0/341/353 rms=0.402232675761 residues
out of a 18k line logfile. nice.
however, it got both test cases, and the second was a redundant
error checking test case where the wrong hand was run through
ARP/wARP. like this:
mistress 9 [~/cranktestdata] % grep atoms generated*/gilu/log | grep residues
generated-feb0205/gilu/log:3884/3665 atoms 257/257.0/257/387 rms=0.00495389765562 residues
generated-feb0405/gilu/log:3646/3665 atoms 151/151.0/151/387 rms=0.00698162302107 residues
generated-feb0405/gilu/log:3592/3665 atoms 9/9.0/97/387 rms=0.239588154743 residues
generated-feb0504/gilu/log:4023/3665 atoms 380/380.0/380/387 rms=0.00345315304147 residues
generated-feb0504/gilu/log:4639/3665 atoms 9/9.0/141/387 rms=0.248391814632 residues
generated-feb0805/gilu/log:4167/3665 atoms 382/382.0/383/387 rms=0.0697324167629 residues
generated-feb0805/gilu/log:4129/3665 atoms 19/19.0/306/387 rms=0.708511969219 residues
generated/gilu/log:4291/3665 atoms 381/381.0/381/387 rms=0.0807934893814 residues
generated/gilu/log:4142/3665 atoms 18/18.0/313/387 rms=0.713575518255 residues
which wasn't really so bad. however, i wanted just the first match. the second attempt
didn't work, i leave it as an exercise to the reader to figure out why. the third, though
worked great:
mistress 10 [~/cranktestdata] % grep -m1 "atoms.*residues" generated*/gilu/log
generated-feb0205/gilu/log:3884/3665 atoms 257/257.0/257/387 rms=0.00495389765562 residues
generated-feb0405/gilu/log:3646/3665 atoms 151/151.0/151/387 rms=0.00698162302107 residues
generated-feb0504/gilu/log:4023/3665 atoms 380/380.0/380/387 rms=0.00345315304147 residues
generated-feb0805/gilu/log:4167/3665 atoms 382/382.0/383/387 rms=0.0697324167629 residues
generated/gilu/log:4291/3665 atoms 381/381.0/381/387 rms=0.0807934893814 residues
just what i needed. please note for these that i didn't fix the rms calculation yet,
so please disregard it.