Closed joshuacalloway closed 9 years ago
Went to meetup last night. Tried simple example as shown in presentation.
jc:/2nddrive/play/zindex/build/Release/tmp$ zgrep -E '^{"eventId":1234,' audit.log.gz {"eventId":1234, "value":"garbage1234"} jc:/2nddrive/play/zindex/build/Release/tmp$ ../zindex --regex '^{"eventId":([0-9]+),' --unique --numeric audit.log.gz ERROR: Invalid preceding regular expression in '^{"eventId":([0-9]+),' jc:/2nddrive/play/zindex/build/Release/tmp$ gzip -d audit.log.gz jc:/2nddrive/play/zindex/build/Release/tmp$ cat audit.log {"eventId":1234, "value":"garbage1234"} {"eventId":5678, "value":"garbage5678"}
Try escaping the { with a backslash or two: I played fast and loose on the slides with escaping to keep them shorter! (Oops!)
that worked
Great stuff; I'll update the slides. Sorry for the confusion!
Went to meetup last night. Tried simple example as shown in presentation.
jc:/2nddrive/play/zindex/build/Release/tmp$ zgrep -E '^{"eventId":1234,' audit.log.gz {"eventId":1234, "value":"garbage1234"} jc:/2nddrive/play/zindex/build/Release/tmp$ ../zindex --regex '^{"eventId":([0-9]+),' --unique --numeric audit.log.gz ERROR: Invalid preceding regular expression in '^{"eventId":([0-9]+),' jc:/2nddrive/play/zindex/build/Release/tmp$ gzip -d audit.log.gz jc:/2nddrive/play/zindex/build/Release/tmp$ cat audit.log {"eventId":1234, "value":"garbage1234"} {"eventId":5678, "value":"garbage5678"}