1
vote
2answers
160 views

Why the inconsistency with using cat vs. echo piped to this sed command?

Inspired by this question: sed: N command does not read single line I wanted to understand why there appears to be an inconsistency between the following 2 commands: #1. echo This command produces ...
7
votes
1answer
717 views

Append same text to many files using cat or echo?

How can I write the same content to many text files by using cat or echo in only one command? For example I want to write "hello" to file1 and file2. I tried: echo "hello" >> file1 file2 ...
6
votes
2answers
4k views

Unexpected results testing serial loopback using echo and cat

So I have a standard RS232 serial port that is looped back to itself by simply running a wire from Tx to Rx. I'm testing loopback by running echo and cat in two separate terminals: cat /dev/ttyS1 ...