小编Rma*_*jan的帖子

如何从文件中提取 elapsedTime 属性值

我希望从文件中提取 elapsedTime 属性值。

记录一下

{"realm":"/test","transactionId":"9e26c614","elapsedTime":17,"elapsedTimeUnits":"MILLISECONDS","_id":"9e26c6asdasd"}
Run Code Online (Sandbox Code Playgroud)

我拥有的文件以 GB 为单位,我想获取大于 10000 的值。

我尝试 grep 但由于冒号 grep 不起作用。

grep -wo --color 'elapsedTime' fileName -> this just prints attribute names
grep -w  --color "elapsedTime" fileName -> this just highlights the attribute. 
Run Code Online (Sandbox Code Playgroud)

text-processing json

2
推荐指数
1
解决办法
125
查看次数

标签 统计

json ×1

text-processing ×1