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