我希望从文件中提取 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)