Code:
$ ./s1
Environment: LC_ALL = C, LANG = C
(Versions displayed with local utility "version")
OS, ker|rel, machine: Linux, 3.16.0-4-amd64, x86_64
Distribution : Debian 8.7 (jessie)
bash GNU bash 4.3.30
datamash (GNU datamash) 1.0.6
-----
Input data file data1:
operation1,83621
operation2,72321
operation3,13288
operation2,12312
operation1,12321
operation2,45455
operation2,42543
operation1,87934
operation4,94865
operation5,27383
operation6,322
operation6,93483
operation7,3223
-----
Expected output:
operation1,12321,87934
operation2,12312,72321
operation3,13288,13288
operation4,94865,94865
operation5,27383,27383
operation6,322,93483
operation7,3223,3223
-----
Results:
operation1,12321,87934
operation2,12312,72321
operation3,13288,13288
operation4,94865,94865
operation5,27383,27383
operation6,322,93483
operation7,3223,3223
-----
Verify results if possible:
-----
Comparison of 7 created lines with 7 lines of desired results:
Succeeded -- files (computed) f1 and (standard) expected-output.txt have same content.
-----
Details for datamash:
datamash command-line calculations (man)
Path : /usr/bin/datamash
Version : 1.0.6
Type : ELF 64-bit LSB executable, x86-64, version 1 (SYSV ...)
Help : probably available with -h,--help
Repo : Debian 8.7 (jessie)
Home : http://www.gnu.org/software/datamash