This program extracts the data of a tag inside a file or xml-tagged stream.

To search for the tag in any position - just specify the tag name.
To search for the next tag in any position - just specify the tag name and the
NextNo (-n)
To search for the tag in an exact position - specify all the tags with '/' as a

    sfftag -t SHIP/SHIP_ID/FUNNEL_SIZE filename
    cat filo | sfftag -t BUGS -n 3

Return value is 0 if found and any other value is an error. So tags with no
data return zero with nothing displayed

Input Parameters are :
    -t : tag or series of tags          default: none
    -n : occurence no               default: 1 for the first
    -o : save any output data in a file     default: no
        If the filename starts with a '/' it is a hard path
        otherwise the path will be assumed under 'spool'.
        Normally all text is displayed
    -a : add this data before the output        default: none
    -A : add this data after the output     default: none
    -D : do NOT display data            default: display
    -H : replace this chr with a hash in the filename   default: # is a #
    -R : Re-order Tags numerically        default: no
    -B : BBCm swb processing            default: no
    -Z : BBCm swb processing - zap copyrights   default: no
    -I : do not track end tags - possibly because   default: track
        there are none ! This implies levels are also ignored.
    -v : print version no and exit

For those switches with parameters, the parameter MUST be separated by a space.

Other env varis can be used to define where the system is :
    SFF_HOME    where the home or top queue is.     default: /fip
            eg  setenv  SFF_HOME    /ripexpress/underware
    SFF_LOG     where the log files queue is        default: (SFF_HOME)/log
    SFF_SPOOL   where the data queues are       default: (SFF_HOME)/spool
    SFF_TMP     where the tmp data queues is        default: (SFF_HOME)/x
            ie if spools are on /data99 which is hard disk /dev/sd0, you MUST also
            have the TMP queue on the same disk/partition

NOTE that for all BUT SFF_HOME, if the parameter starts with a '/' then it is a
hard, absolute path; if not then the spool area is under SFF_HOME.
    eg  setenv  SFF_SPOOL   /data7      will look under /data7 for queues
    while   setenv  SFF_SPOOL   data7       will look under /fip/data7

Version Control
;002g   01dec99 bbcm mods for swb ;a/b/c/d minors ;e -H added ;g bugette
;001    13nov99 major revamp
;000    22sep98 chj original version

(copyright) 2017 and previous years FingerPost Ltd.