The problem seems to be that iwextattr wraps all the output to a single line.This is in TS 5.5.2
most likely somebody has put end-of-lines in metadata (or other EAs). This causes *some* EAs be incomplete.
This can be coded for - if you're pulling each EA off one at a time, ensure you get the full EA and then encode all newlines with some unlikely-to-be-used string (e.g. X_NL_X) - then when you go to apply the EAs on the other side, you convert the string back before running the iwextattr command to set the EA.In 6.x you can use the '-x' flag to extract / set EAs in XML format such that newlines are no longer an issue (but embedded XML / XML characters are)