Annotation of researchv8dc/cmd/wwb/acro.sh, revision 1.1.1.1

1.1       root        1: # NOTICE-NOT TO BE DISCLOSED OUTSIDE BELL SYS EXCEPT UNDER WRITTEN AGRMT
                      2: L=/usr/lib/style
                      3: trap 'rm -f /tmp/$$*; trap 0; exit' 0 1 2 3 15
                      4: for i in $*
                      5: do case $i in
                      6:        -ver) echo $0 version 2.0: 2.0;exit;;
                      7:        -flags) echo $0 \[-s\] \[-flags\] \[-ver\] file ...;exit;;
                      8:        -*) echo unknown acro flag $i;exit;;
                      9:         *) if test ! -r $i
                     10:         then    echo -e \\nCan\'t find the text file $i\; try specifying a more complete pathname.; exit
                     11:         fi
                     12:    esac
                     13: done
                     14: echo "This program searches for acronyms in a text file.
                     15: It will also find words that are printed in capital letters."
                     16: for i in $*
                     17: do
                     18:        deroff -w $i | grep "[A-Z][A-Z]" |
                     19:        sort -d  | uniq -c > /tmp/$$2
                     20:        if test -s /tmp/$$2
                     21:        then
                     22:                echo -e "\nThe following acronyms are used in file \"$i\":"
                     23:                cat /tmp/$$2
                     24:                echo -e "\nAcronyms appear on the following lines of \"$i\":\n"
                     25:                 sed -f $L/acro.sed /tmp/$$2 > /tmp/$$3
                     26:                $L/dprog -A -n -l -f /tmp/$$3 $i
                     27:        else echo -e "\nNo acronyms found in file \"$i\".\n"
                     28:        fi
                     29: done

unix.superglobalmegacorp.com

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