How to cat multiple files from a list of files in Bash?

后端 未结 6 893
故里飘歌
故里飘歌 2020-12-16 18:08

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

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-16 18:54

    {
      while read file
      do
        #process comments here with continue
        cat "$file"
      done
    } < tmp > newfile
    

提交回复
热议问题