New answers tagged newlines
pipe the output to xargs #!/bin/sh -x while do date > temp ping cp1za >> temp cat temp | xargs echo done Tue Dec 17 18:23:31 UTC 2013 CS V1R12: Pinging host CP1ZA.TMMNA.TMM.TOYOTA.C (220.127.116.11) Ping #1 response took 0.001 seconds.
You're seeing output to the terminal while it is not in NLCR mode (stty -onlcr). Normally the kernel driver for ttys outputs a carriage return along with a newline whenever a newline is output. With NLCR mode disabled newlines are output as is, which moves the cursor down one line but leaves it in the same column. This produces the staggered output you ...
Top 50 recent answers are included