0

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.

4
  • I just notice that this may be related: stackoverflow.com/questions/29747539/…
    – bers
    Commented Mar 22, 2017 at 13:32
  • 1
    Considering that more is specifically meant to be an interactive tool and not redirected to file, is there any point in all of this? Commented Mar 22, 2017 at 13:32
  • @grawity: Yes. I have noticed that (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
    – bers
    Commented Mar 22, 2017 at 13:35
  • 1
    In that case, maybe you should be asking about the behavior of vpncli.exe, not about more.com.
    – user
    Commented Mar 22, 2017 at 14:05

0

You must log in to answer this question.

Browse other questions tagged .