Linux shell simultaneous statistical key

each line of the text file record.json is a json, and the four fields of each json, K1Mus4, together represent a key key, that asks for the number of times this key occurs, and the number of keys that are not repeated.
try the idea is K1-4 splice key, to find the number of times and do not repeat the number of times, but do not know how to concatenate.

Menu