Annotation of researchv10dc/cmd/post/update, revision 1.1

1.1     ! root        1: new= fmt= nl='
        !             2: '
        !             3: get() {
        !             4:        attr=$1; shift
        !             5:        eval echo -n '"$*: [$'$attr'] "'; read val
        !             6:        [ -n "$val" ] && new=$new$nl$attr=$val
        !             7: }
        !             8: ask() {
        !             9:        echo -n "$*? [yes] "; read yesno
        !            10:        case $yesno in [^yY]*) return 1;; esac
        !            11: }
        !            12: pid='no default'
        !            13: get pid "Enter your SSN (PAN for Bell Labs)"
        !            14: eval $new
        !            15: [ -z "$pid" -o "$pid" = "-" ] && exit
        !            16: pq "pid=$pid" || {
        !            17:        echo The directory does not have a record for you.
        !            18:        exit
        !            19: }
        !            20: ask Is this your name || exit
        !            21: ask Is the data correct && exit
        !            22: for attr in pid pn org loc room tel ema
        !            23: do fmt=$fmt$nl$attr=\"%$attr\"
        !            24: done
        !            25: eval `pq -o "$fmt" "pid=$pid"`
        !            26: new=pid=$pid${nl}pn=$pn
        !            27: get org  New organization
        !            28: get loc  New location
        !            29: get room New room
        !            30: get tel  New telephone
        !            31: get ema  New electronic mail address
        !            32: echo "$new" | /bin/mail `pq -o %ema update.post`
        !            33: echo Please allow 2-4 weeks for update.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.