Created
January 19, 2015 20:56
-
-
Save fprimex/8bf4515d27247a5cdb7c to your computer and use it in GitHub Desktop.
Demonstrate AWK bug on OS X.
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
BEGIN { | |
string1 = "[couchdb:info,2014-04-22T22:30:04.873,ns_1@node:<0.6548.6>:couch_log:info:39]164.55.92.41 - - GET /default/_design/v6/_view/v6_sizes?group=true&group_level=1 500" | |
string2 = "[couchdb:info,2014-06-15T6:30:06.928,ns_1@node:<0.3037.5064>:couch_log:info:39]164.55.92.41 - - GET /default/_design/v6/_view/v6_sizes?group=true&group_level=1 200" | |
match(string1, /_view\/[_[:alnum:]]+/) | |
view = substr(string1, RSTART, RLENGTH) | |
print view | |
match(string2, /_view\/[[:alnum:]_]+/) | |
view = substr(string2, RSTART, RLENGTH) | |
print view | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output if the bug is present: