Hacker News new | ask | show | jobs
by lexicality 2648 days ago
Pretty sure nano was changing your code to

    echo 'this is a test' > test\n
and then echo was adding the newline because you didn't specify -n.
1 comments

...and also

  echo 'this is a test\n'
doesn't produce an additional new line because -e wasn't specified.