这是一个有点以.json文件,我需要找资料:找到两个字符串之间的字符串的文件
"title":
"Spring bank holiday","date":"2012-06-04","notes":"Substitute day","bunting":true},
{"title":"Queen\u2019s Diamond Jubilee","date":"2012-06-05","notes":"Extra bank holiday","bunting":true},
{"title":"Summer bank holiday","date":"2012-08-27","notes":"","bunting":true},
{"title":"Christmas Day","date":"2012-12-25","notes":"","bunting":true},
{"title":"Boxing Day","date":"2012-12-26","notes":"","bunting":true},
{"title":"New Year\u2019s Day","date":"2013-01-01","notes":"","bunting":true},
{"title":"Good Friday","date":"2013-03-29","notes":"","bunting":false},
{"title":"
该文件是更长的时间,但它是文本的一个长行。
我想,以显示它是什么银行假日在某个日期之后,并且如果它涉及彩旗。 我试过grep和sed但我找不出来。 我想是这样的:
[command] between [date] and [}] display [title] and [bunting]/[no bunting]
[title]
应该仅仅是“圣诞节”或别的东西
忘了提: 我想在bash shell实现这一点,无论是从提示或者来自一小段代码。
那岂不是更容易映射到JSON对象(OOP语言),并从那里走? – hovanessyan
用于Linux的命令行工具结算 - jsawk - https://github.com/micha/jsawk和JQ - HTTP://stedolan.github。io/jq/tutorial/ – hovanessyan