Automatically detect whether CR/LF is present in output by simply running the echo command twice and seeing if it contains any additional whitespace.