I have a text file containing a list of files. I want to cat
their contents together. What is the best way to do this? I did something like this, but it seems too complicated:
let count=0 while read -r LINE do [[ "$line" =~ ^#.*$ ]] && continue if [ $count -ne 0 ] ; then file="$LINE" while read PLINE do echo $PLINE | cat - myfilejs > /tmp/out && mv /tmp/out myfile.js done < $file fi let count++ done < tmp
I skipped the commented lines and ran into problems. There should be a better way to do this without two cycles. Thanks!
source share