File: stat.awk

package info (click to toggle)
gforth 0.7.3%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 5,992 kB
  • sloc: ansic: 8,535; sh: 3,666; lisp: 1,778; makefile: 1,019; yacc: 186; sed: 141; lex: 102; awk: 21
file content (13 lines) | stat: -rw-r--r-- 211 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
BEGIN {
  FS="\t";
}
{
  dyn[$2] += $1;
  stat[$2]++;
  files[$2] += (FILENAME!=filename[$2]);
  filename[$2] = FILENAME;
}
END {
  for (i in dyn)
    printf("%7d\t%7d\t%15d\t%s\n",files[i],stat[i],dyn[i],i);
}