view cdbmake-sv.sh @ 11:978eaa166609

more trivial changes to get rid of compile-time warnings, nndb is still working, need to test cdbmake and friends
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Fri, 31 Jan 2025 17:28:35 +0000
parents 2cb46628feec
children
line wrap: on
line source

awk '
  {
    if (split($0,x,"#")) {
      f = split(x[1],y)
      if (f >= 2) {
        if (split(y[2],z,"/") >= 2) {
          a = "@" z[1] "/" z[2]
          print "+" length(a) "," length(y[1]) ":" a "->" y[1]
          for (i = 1;i <= f;i += 1) {
            if (i != 2) {
              a = y[i] "/" z[2]
              print "+" length(a) "," length(z[1]) ":" a "->" z[1]
            }
          }
        }
      }
    }
  }
  END {
    print ""
  }
' | HOME/bin/cdbmake "$@"