How to add literal text to the Unix 'cat' command
bash, cat
Solution
If I understand you, it should be something like:
echo "# Final version (reflecting my edits)\n\n" >> combined.md
cat final.md >> combined.md
echo "\n\n# The changes I made\n\n" >> combined.md
cat edit.md >> combined.md
And so on.
Problem
I'm trying to cat some files together, while at the same time adding some text between files. I'm a Unix newbie and I don't have the hang of the syntax. Here's my failed attempt: ``` cat echo "# Final version (reflecting my edits)\n\n" final.md echo "\n\n# The changes I made\n\n" edit.md echo "\n\n#Your original version\n\n" original.md > combined.md ``` How do I fix this? Should I be using pipes or something?