shell - cat - merge files content into one big file
cat, shell
Solution
The problem is that you put `bigfile` in the same directory, hence making it part of `*`. So something like
cat dir/* > bigfile
should just work as you want it, with your `fileN.txt` files located in `dir/`
Problem
I'm trying, using bash, to merge the content of a list of files (more than 1K) into a big file. I've tried the following cat command: ``` cat * >> bigfile.txt ``` however what this command does is merge everything, included also the things already merged. e.g. file1.txt ``` content1 ``` file2.txt ``` content2 ``` file3.txt ``` content3 ``` file4.txt ``` content4 ``` bigfile.txt ``` content1 content2 content3 content2 content3 content4 content2 ``` but I would like just ``` content1 content2 content3 content4 ``` inside the .txt file The other way would be `cat file1.txt file2.txt ...` and so on... but I cannot do it for more than 1k files! Thank you for your support!