Created
April 13, 2016 08:16
-
-
Save reimai/cb9c1c5915607a91dca4fb957c690e7e to your computer and use it in GitHub Desktop.
parse fix quote events messages out of tcp dump to compare receiving and sending time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#turn tcp dump into a text file: | |
# receiving_time -> fix_msg_sending_time | |
tcpdump -A -r - | strings | sed 's/\.\([[:digit:]]\+=\)/|\1/g' | sed 's/\.*$//g' | sed 's/^[^|]*|/|/g' | grep 'length\|8=FIX' | grep -B 1 '35=X' | grep -v '^--$' | cut -d ' ' -f 1 | sed 's/.*52=\([^|]*\).*/-> \1/g' | paste - - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment