# for i in $(ls chapters); do printf '\\input{chapters/%s}\n\\newpage\n\n' $i; done > chapters.tex
for i in $(ls chapters); do printf '\\input{chapters/%s}\n' $i; done > chapters.tex