Bash script echo seems to remove my new lines? [duplicate]
问题 This question already has answers here : I just assigned a variable, but echo $variable shows something else (7 answers) Closed 2 years ago . This is the contents of my file file.txt: header a b c I have no idea what is going on. This command does not print new lines. echo -e $(tail -n +2 file.txt) This prints: a b c But if you write it to file you will clearly see new lines: tail -n +2 file.txt >> new_file.txt test.txt a b c How do I force echo to print the new lines? I don't think I can use