- fixed Category handling in the Contact record class, to
[barry.git] / src / convo.awk
blobb3836caa41cef02acacca38632704d83fbf4b066
2 # This script is useful for turning a UsbSnoop log file into something
3 # more readable. It assumes USB endpoints 0x05 and 0x82
6 BEGIN {
7 # 0 for down
8 # 1 for up
9 direction = 0;
11 # boolean
12 docopy = 0;
15 />>>/ {
16 direction = 0;
17 docopy = 0;
18 print $0;
21 /<<</ {
22 direction = 1;
23 docopy = 0;
24 print $0;
27 /endpoint 0x00000005/ {
28 # only copy data going to the output endpoint
29 if( direction == 0 ) {
30 docopy = 1;
31 printf "\nsep: 5\n";
35 /endpoint 0x00000082/ {
36 # only copy data coming from the input endpoint
37 if( direction == 1 ) {
38 docopy = 1;
39 printf "rep: 82\n";
43 /^ [0-9AaBbCcDdEeFf]*: / {
44 if( docopy ) {
45 print $0;