Concatenating multiple text files into a single file in Bash

前端 未结 12 1615
眼角桃花
眼角桃花 2020-11-29 15:31

What is the quickest and most pragmatic way to combine all *.txt file in a directory into one large text file?

Currently I\'m using windows with cygwin so I have acc

12条回答
  •  心在旅途
    2020-11-29 15:51

    all of that is nasty....

    ls | grep *.txt | while read file; do cat $file >> ./output.txt; done;
    

    easy stuff.

提交回复
热议问题