使用 AWK 或 SED 以逗号分隔,并使用以下标签:
[BEGIN AccountID]
[BEGIN CallerID]
[BEGIN Billed Account Attributes]
1111111
1111111
1111111
[END Billed Account Attributes]
[BEGIN OBIO Tax]
10
20
30
[END OBIO Tax]
[BEGIN RINO Tax]
777
888
999
[END RINO Tax]
[BEGIN CallerID]
[END AccountID]
[BEGIN AccountID]
[BEGIN CallerID]
[BEGIN Billed Account Attributes]
2222222
2222222
2222222
[END Billed Account Attributes]
[BEGIN OBIO Tax]
40
50
60
[END OBIO Tax]
[BEGIN CallerID]
[END AccountID]
我想要一个 AWK 或 SED 脚本来打印这个:
1111111,1111111,1111111, 10,20,30, 777,888,999
2222222,2222222,2222222, 40,50,60, 0, 0, 0
....
....
....
不显示 RINO TAX 时,用逗号分隔并置零。
非常感谢!!!!