Multi-line snippets merge first two lines
Opened this issue · 0 comments
ravenx99 commented
File containing:
echo this
echo that
echo us
gets output as
echo thisechothat
echo us
echo -n "$(tac "$path")" | tac
The above is wrong... the first tac
puts line 1 at the end, and then echo -n
omits the newline. The second tac
then runs line 1 and 2 together.
echo -n "$(cat "$path")"
Will remove the trailing newline from the end of the input, which I expect is sought-after behavior.