I have several text files in a single folder, and I would like to merge only certain sequential files into one long one (where one file comes immediately after the next).
For example, I want to merge all files starting with test (so test1.txt, test2.txt, test3.txt, and so on) into one file named file.out, like so:
Stuff from test1
Stuff from test2
...
Stuff from testN
I tried cat * > file.out, but that merges everything, which is not what I want. How can I do this?