Copyright (c)  1994, 1995, 2002  Timothy Rue (

  Permission is granted to copy, distribute and/or modify this document
  under the terms of the GNU Free Documentation License, Version 1.2
  or any later version published by the Free Software Foundation; with no
  Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

  A copy of the license is included in the file fdl.html


                  (OI) Output-to-Input (or Obtain-Input)


     OI - get input into variable, with optional tag.

     OI - Output-to-Input - The concept of Output-to-Input is, for there to be
          input, there must be output from something to grab as input.
          Output-to-Input is a reminder of "Connection".


    (OI) Obtain-Input - Concept of Obtain-Input is to grab input and place it as
         the contents of a variable. A very common function but also contained
         is an optional content tag of the variable as defined by IP tag. Also
         if the amount of input is larger than a given amount, a file is created
         to contain the content and the filename is placed as the value of the
         variable in the OI file. This "OI-file" contains the list of variables,
         their optional content tags and their values. PK cannot alter the
         contents of the OI-file, only OI can. But PK can change the OI-file
         used by OI. Generally, the active OI-file is located in RAM. OI can
         by-pass the IP setting by directly setting the variable and using
         command line redirection/pipe. I.E. "PK IP -r1 | OI -c var"

 Possible OI-file variable data formats:
variable-name ;;
variable-name ; tag ;
variable-name ;; value
variable-name ; tag ; value
variable-name ; tag ; @OI-filename.varname
variable-name ;; @OI-filename.varname


        Variables are handled in the typical shell manner, where using a '$' in
        front of a variable name i.e. $varname will access the variable content
        and an escape character '\' to allow the use a '$' as a normal character
        rather than a special character, i.e. '\$test' will output '$test'. This
        way it is possible to create a variable having content containing
        '$variable' or multi-depth variables.

 OI Commands:

     OI                             returns PK OI line

     OI -?                          help on OI

     OI -oi                         returns current list of vars & values
                                    (including any tags)

     OI variable                    gets input from user/device into variable
                                    using IP set. If input is greater than 255
                                    characters a file is created to contain the
                                    variables content. The filename is set to
                                    OI-filename.varname where the "OI-filename"
                                    part is the same as the OI-filename and the
                                    "varname" is the same as the variable name.

                                    The tag, if any, will be kept in the actual
                                    OI-file but a pointer '@' to file will
                                    follow in place of the variable value i.e.
                                    @OI-filename.varname  (the '@' symbol
                                    indicating "value at".) Access to the value
                                    contained in such pointed to files is always
                                    through the OI-file variable list.

     OI -c var                      cancels variable.

     OI -c var value                creates/changes variable/value.

     OI -ct var tag                 sets variable tag to tag given.

     OI -rt var                     returns tag of given variable.

     OI -ct var                     cancels variable tag (only the tag).