Formatting output from the Exec Node?

Adding the $trim doesn’t seem to help, it hasn’t removed the leading spaces, and it’s actually removed the hierarchical formatting that was there without it.