I have a text stream like this
<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" />
from which i would like an output like
05023CA70900@@1@@-1@@switch@@Appliance Home@@Google@@false@@427
0501C1D82300@@2@@-1@@switch@@TELEVISION Home@@Google@@pending@@3272
There are many lines in the input all of which are not writable.
How can we achieve this using awk or sed ?