Concatenating multiple text files into a single file in Bash

前端 未结 12 1625
眼角桃花
眼角桃花 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 16:11

    the most pragmatic way with the shell is the cat command. other ways include,

    awk '1' *.txt > all.txt
    perl -ne 'print;' *.txt > all.txt
    

提交回复
热议问题