Compare these two command, which should be the same thing according to my understanding:
echo abc>tmp1
echo abc|more>tmp2
And they do, largely. tmp2 has an extra blank line at the end, but I don't worry about that.
Now, this is a slightly more complicated case:
(echo abc&echo def)>tmp3
(echo abc&echo def)|more>tmp4
tmp4, in addition to having an extra blank line at the end, also has an extra space at the end of each non-empty line. How can that be? Can I present it? I currently use sed -e 's-[ ]$--g', but I would like not to rely on GNUwin.