2
votes
1answer
39 views

How do you implement totals from usage output generated by a program in a script so that they carry on sanely through repeated execution?

I have a script with a pipeline where the data is throttled by a program. Every 20 minutes, a throughput status is sent on stderr, and I simply redirect this to a file: command | cstream -t -512k -T ...
6
votes
1answer
135 views

counting the number of occurences in a file of data list

I have a data file, like 7 2 10 9 10 3 2 4 2 4 6 Each line has a single value. I want to count the occurence of each value. For instance, 10 occurs two times in this file. Is there a simple way ...