When I use xargs with echo, why does the output contain an extra space?
I have a small puzzler here. I'm trying to create a one-liner, where I am combining the output from two different echo commands. The result is not quite what I expect.
For example, I expect the following command to list both lines aligned. But it does not:
# echo "1 2 3" | xargs echo -e "A B C\n"
A B C
_1 2 3
Notice the extra space on the second line (denoted by the "_"). It seems as if xargs adds a space... but why?
(For others having this problem: In order to fix it, I just add the backspace sequence to echo: echo "1 2 3" | xargs echo -e "A B C\n\b" )