WIN C.
WIN C.

Reputation: 19

How to merge files from keyword filename?

I have many files in a folder, contain

4628_group_1
3643_group_0
7578_group_1
4684_group_0

Finally, I merge file into 2 groups

Group1.csv is merged from 4628_group_1 and 7578_group_1
Group0.csv is merged from 3643_group_0 and 4684_group_0

Upvotes: 0

Views: 31

Answers (1)

gmatht
gmatht

Reputation: 835

Depending on what you mean by merge, you may be able to achieve this with two simple cat commands.

cat *_group_0 > Group0.csv
cat *_group_1 > Group1.csv

Upvotes: 1

Related Questions