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.
more
is specifically meant to be an interactive tool and not redirected to file, is there any point in all of this?(echo a&echo b) | vpncli.exe -s
does not work, while(echo a&echo b) | more | vpncli.exe -s
does, except for those addes spaces. Compare superuser.com/a/930475/253137