`execute_process` has the `OUTPUT_STRIP_TRAILING_WHITESPACE` option. Or do you need to strip leading whitespace, as well?