Browse Source

drop powerpc- so that we now have enough column space to fit git revs

Add the script and commands used for this analysis so that I'll remember
it in the future...
main
John-Mark Gurney 3 years ago
parent
commit
8c4adf677a
Signed by: jmg GPG Key ID: 205F0B33DD006ADA
2 changed files with 27 additions and 2 deletions
  1. +20
    -0
      maxcol.awk
  2. +7
    -2
      snapaid.sh

+ 20
- 0
maxcol.awk View File

@@ -0,0 +1,20 @@
#!/usr/bin/awk -f

{
if (NF > maxnf)
maxnf = NF

for (i = 1; i <= NF; i++) {
l = length($i)
if (l > ar[i]) {
ar[i] = l
ex[i] = $i
}
}
}

END {
for (i = 1; i <= NF; i++) {
printf("%2d %2d %s\n", i, ar[i], ex[i])
}
}

+ 7
- 2
snapaid.sh View File

@@ -326,12 +326,17 @@ elif [ x"$1" = x"find" ]; then
cnt=$(wc -l < selection)
awk '
BEGIN {
fmtstr = "%2s %-3s %-15s %-18s %-18s %-8s %-7s\n"
printf(fmtstr, "#", "TYP", "RELEASE", "ARCH", "PLATFORM/TYPE", "DATE", "SVNREV")
# xzcat snapshot.complete.idx.xz | ./maxcol.awk
# xzcat snapshot.complete.idx.xz | awk '{ print $3}' | sort -u
# note that for powerpc-* that first part is dropped
fmtstr = "%2s %-3s %-15s %-14s %-18s %-8s %-11s\n"
printf(fmtstr, "#", "TYP", "RELEASE", "ARCH", "PLATFORM/TYPE", "DATE", "REV")
cnt = 1
}

{
if ($3 ~ /^powerpc-/)
$3 = substr($3, 9)
if ($4 == "xxx")
plt=$7
else


Loading…
Cancel
Save