Created
March 20, 2014 23:27
-
-
Save kkarad/9676260 to your computer and use it in GitHub Desktop.
awk merge two clusteredlines
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
kostas@localhost ~$ cat fix.log | |
2014-03-20 10:30:20,123 123456.123456789 MassQuote | |
2014-03-20 10:30:20,133 123456.123456789 MassQuoteAcknowledgement | |
2014-03-20 10:31:20,234 123456.123456789 MassQuote | |
2014-03-20 10:31:20,240 123456.123456789 MassQuoteAcknowledgement | |
kostas@localhost ~$ cat fix.log | awk '!(NR%2){printf("%s %s %s %s\n",p,$1,$2,$3)}{p=$1" "$2}' | |
2014-03-20 10:30:20,123 2014-03-20 10:30:20,133 123456.123456789 | |
2014-03-20 10:31:20,234 2014-03-20 10:31:20,240 123456.123456789 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment