I am trying to clean up the results that report back on my EA. I am sure this is something simple but my eyes are getting cross-eyed trying to get the correct syntax.
I have an EA that reports back the board-id of the systems.
echo "<result>$(ioreg -p "IODeviceTree" -r -n / -d 1 | grep "board-id")</result>"
reports back "board-id" = <"Mac-6F01561E16C75D06">
To delete the "board-id" = I added the | awk '{print $3}'
echo "<result>$(ioreg -p "IODeviceTree" -r -n / -d 1 | grep "board-id" **| awk '{print $3}'**)</result>"
reports back **<"**Mac-6F01561E16C75D06**">**
To delete the "" I added the | sed s/"//g
echo "<result>$(ioreg -p "IODeviceTree" -r -n / -d 1 | grep "board-id" | awk '{print $3}' **| sed s/"//g)**</result>"
reports back **<**Mac-6F01561E16C75D06**>**
To delete the < I added the | sed s/<//g
echo "<result>$(ioreg -p "IODeviceTree" -r -n / -d 1 | grep "board-id" | awk '{print $3}' **| sed s/<//g**)</result>"
reports back **"**Mac-6F01561E16C75D06**">**
To delete the < & " I added the | sed s/<"//g
echo "<result>$(ioreg -p "IODeviceTree" -r -n / -d 1 | grep "board-id" | awk '{print $3}' **| sed s/<"//g**)</result>"
reports back Mac-6F01561E16C75D06**">**
I cannot get the syntax correct to report without <" & ">
What I want it to report back is Mac-6F01561E16C75D06