bash - Delete last character from line that contains specific word
问题描述
I want to delete the last comma from a line that contains a specific string/word
I have tried a couple examples with sed, but none provided the correct result.
{
"src4_addr" : "10.10.10.10",
"dst4_addr" : "11.11.11.11",
"in_bytes" : 70,
},
I would like to eliminate the comma from the line that contains the word in_bytes
.
Expected result:
{
"src4_addr" : "172.27.90.18",
"dst4_addr" : "172.27.90.131",
"in_bytes" : 70
},
解决方案
推荐阅读
- javascript - 角度获取 api
- django - create_user() 缺少 1 个必需的位置参数:“密码”
- java - 如何在 itext pdf Java 中创建无边框的 pdfTemplate?并且它也延伸到下一页
- sublimetext3 - 在本地机器 sublime 上打开 URL
- r - 在 R 中提取分钟级数据
- python-3.x - tracer.run('main()') 报告名称错误
- eventkit - 如何在 macOS 应用程序中使用 Swift 中的 EventKit 获取日历权限
- c# - 无法从角度检索 C# cookie
- r - 从源代码编译 R 包时,编译器是否重要?
- django - 姜戈;正确显示项目的问题