我有一个像这样的文本流
,我想从中得到一个输出,比如
输入中有很多行都是不可写的。
<device nid="05023CA70900" id="1" fblock="-1" type="switch" name="Appliance Home" brand="Google" active="false" energy_lo="427" />
<device nid="0501C1D82300" id="2" fblock="-1" type="switch" name="TELEVISION Home" brand="Google" active="pending" energy_lo="3272" />
05023CA70900@@1@@-1@@switch@@Appliance Home@@Google@@false@@427
0501C1D82300@@2@@-1@@switch@@TELEVISION Home@@Google@@pending@@3272
我们如何使用 awk 或 sed 来实现这一点?