On our server a cronjob has logged a count of files in a shared directory. The log is of the form:2003-07-03T16:05 2792003-07-03T16:10 2832003-07-03T16:15 282By now this file has far over a million entries. I am interested in finding the biggest changes we ever had (negative and positive). I can write a program to find this, but is there some tool that can give me a list of deltas?The original is on Solaris, but I have a copy of the file on my Linux Mint system.
Delta of numbers in file
text processing;numbering
If you have the package num-utils installed, you can do:cut -d ' ' -f 2 inputfile | numinterval | sort -u The first and the last number there give the min, resp. max changes.If that list is too long and you also have moreutils installed you can do:cut -d ' ' -f 2 inputfile | numinterval | sort -u | pee tail -1 head -1On Mint you should be able to install those packages, on Solaris you probably have to compile from source.