【发布时间】:2013-12-31 05:48:54
【问题描述】:
我在 linux 中有以下文本作为输出:
service {'name': 'services'}
enable yes
frequency 7200
service {'name': 'files'}
enable yes
frequency 6000
none
我正在寻找将输出转换为以下内容的方法:
services yes 7200
files yes 6000
我正在使用下一个命令:
| xargs -n 7 | awk '{print $3 " / " $5" / " $7}'
但作为输出我有:
services} / yes / 7200
files} / yes / 6000
无论如何要删除那个},或者得到没有这个字符的最后一个输出?
【问题讨论】: