Created
June 24, 2014 01:46
-
-
Save nad2000/8d7969b741d253a00811 to your computer and use it in GitHub Desktop.
Pattern matching for $1 = '6028276268421821235', $2 = '6028276268851317965', $3 = '85899200', $4 = NULL, $5 = NULL, $6 = NULL, $7 = 'byte', $8 = '10' and $1 = '6028276268421821235', $2 = '6028276268851317965', $3 = '85899200', $4 = NULL, $5 = NULL, $6 = NULL, $7 = 'byte', $8 = '10'
This file contains hidden or 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
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = '[0-9]+'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | |
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = NULL, \\\$5 = NULL, \\\$6 = NULL, \\\$7 = 'byte'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | |
grep -E "\\\$1 = '[0-9]+', \\\$2 = '[0-9]+', \\\$3 = '[0-9]+', \\\$4 = NULL, \\\$5 = NULL, \\\$6 = NULL, \\\$7 = 'byte'" /endace/pgsql/pg_log/postgresql-24.log | sed -n "s/.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*'\([0-9]*\)'.*/\1,\2,\3,\4/p" | awk -F, '{print $1,$2,$3,$4, $2-$1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment