I have a text file that holds a list of files. I want to cat their contents together. What is the best way to do this? I was doing something like this but it
cat
I ended up with this:
sed '/^$/d;/^#/d;s/^/cat "/;s/$/";/' files | sh > output
Steps:
sed removes blank lines & commented out lines from files.
sed then wraps each line in cat " and ";.
cat "
";
Script is then piped to sh with and into output.