I have two files stored with lists of file names:
FileA:
GSM1328513
GSM1328514
GSM1328515
GSM1328516
GSM1328545
GSM1328546
GSM1328547
GSM1328548
GSM1328609
GSM1328610
GSM1328611
GSM1328612
and:
FileB:
Brn
Hrt
Lng
I want to do this, merge every four files listed in file A, and name the concatenated file as the names of the files listed in file B: To do this manually, it looks like this:
cat GSM1328513 GSM1328514 GSM1328515 GSM1328516 > Brn
cat GSM1328545 GSM1328546 GSM1328547 GSM1328548 > Hrt
cat GSM1328609 GSM1328610 GSM1328611 GSM1328612 > Lng
Since I have a long list of files, I want to do this automatically if anyone can help. If something is unclear, please indicate.
source
share