I have a large amount of json files and previously I was told to use the following line to search if a tweet is created at a specific time range in a date:
grep -wirnEzc '},.*created_at":\s"Wed Oct 19 2(1:[0-5][0-9]:[0-5][0-9]|2:([0-2][0-9]:[0-5][0-9]|30:00)) .* 2016' *
I am not aware what are the following exactly trying to represent:
2(1:[0-5][0-9]:[0-5][0-9]|2:([0-2][0-9]:[0-5][0-9]|30:00))
As for now, I need to change it so that I can find the number of results returned by this grep that are between between July 17, 2016 and November 8, 2016 for the "created_at" field. Here's an example of one of those json files: https://hastebin.com/budovutume.scala
As you see each json file can contain various tweets. So basically I am looking to search through all these *.json files and search for the "created_at": patterns that are followed in the next line by "retweeted": because other things like profile or profile image could have the attribute "created_at":. And the date range I am looking for is July 17 2016 to November 8 2016.
An example of interest (not date-wise):
},
"created_at": "Wed Dec 14 22:34:28 +0000 2016",
"retweeted": false,
"coordinates": null,
"in_reply_to_user_id_str": null,
"source": "<a href=\"https://ifttt.com\" rel=\"nofollow\">IFTTT</a>",
"in_reply_to_status_id_str": null,
"in_reply_to_screen_name": null,
"in_reply_to_user_id": null,
"extended_entities": {