Plan 9 from Bell Labs’s /usr/web/sources/contrib/pac/dat/strat/scripts/preceeds
#!/bin/rc ### # print stage that preceeds NAME ### name=$1 base=`{awk -F* '$1 ~ /'$name'/ {print $2}' unt.g} where=`{awk -F* '$1 ~ /'$name'/ {print $4}' unt.g} awk -F* '$4 ~ /'$where'/ && $5 ~ /Stage/ && $3 == '$base' {print $1}' unt.g