I have 6 files and would like to group them by 2 or 3 according to the average size.
file1.log 50G file2.log 40G file3.log 20G file4.log 10G file5.log 30G file6.log 70G
70G is the biggest file and I would like to group the rest of the files according to the biggest.
The output should look like this:
- Group by 1 should contain all the files - Parallel 1
- Group by 2 - Parallel 2
file4.log 10G file5.log 30G file6.log 70G
file1.log 50G file2.log 40G file3.log 20G
Notice average is both files are equals.
The third group parallel 3 should look like this:
file1.log 50G file3.log 20G
file2.log 40G file4.log 10G file5.log 30G
It does not have to be the exact average, just divide the file the closest average possible.