我有一个文件的abc.txt的内容是如何从一个文本文件
{ “storageSummary” 打印特定的词:{ “binariesSummary”:{ “binariesCount”: “703”, “binariesSize”:” 882.39 MB“,”artifactsSize“:”3.41 GB“,”优化“:”25.23%“,”itemsCount“:”4,126“,”artifactsCount“:”1,917“},”fileStoreSummary“:{”storageType“:”file - “system”,“storageDirectory”:“/ jfrog_uat_nfs/binaries”,“totalSpace”:“1.30 TB”,“usedSpace”:“1.23 GB(0.09%)”,“freeSpace”:“1.30 TB(99.91%)”}} ,“repositoriesSummaryList”:[{“repoKey”:“sbt_remote-cache”,“repoType”:“CACHE”,“foldersCount”:0,“filesCount”:0,“usedSpace”:“0字节”,“itemsCount” 0 “packageType”: “SBT”, “百分比”: “0%”},{ “repoKey”: “test7.mvlo”, “repoType”: “本地”, “foldersCount”:0 “filesCount”:1 ,“usedSpace”:“128字节”,“itemsCount”:1,“packageType”:“Maven”,“百分比”:“0%”},{“repoKey” :“scripttestkp.rplo”,“repoType”:“LOCAL”,“foldersCount”:0,“filesCount”:0,“usedSpace”:“0字节”,“itemsCount”:0,“packageType”:“RPM”, “percentage”:“0%”},{“repoKey”:“test7.grvr”,“repoType”:“VIRTUAL”,“foldersCount”:0,“filesCount”:0,“usedSpace”:“0字节”, “itemsCount”:0,“packageType”:“Gradle”,“百分比”
从该文件中如何在shell脚本中只打印“repoKey”和“usedSpace”。
这是一个'json'输入?看起来像一个破'JSON'输入标题上进行验证文件,并提供完整的'json'输入。 – Inian
修复输入文件后使用适当的'JSON'解析器 – Inian
为什么说json是错误的,英语?看起来没问题乍一看...看起来他错过了一些剪切和粘贴也许 –