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 printf
here without making some kind of loop.