Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

10.0;not, revision 1.0, 88/01/21
not -- Negate a Boolean value.
usage: not command



DESCRIPTION
     not takes the Boolean value returned by a command or expression and
     negates it.  This is useful primarily with the program control structures
     (if, while, etc.) used in shell scripts.

ARGUMENTS
     command (required)
                    Specify a command or expression that returns a Boolean
                    value.

EXAMPLES
     Assume the following lines appear inside shell scripts.

         #
         # Loop as long as no error file exists.
         #
         while not existf error_file
         do args "No error file yet ..."
         enddo
         # End of script

         #
         # Verify user response.
         #
         eon
         read -p "Type the pathname of the file to be deleted: " name
         read -p "Are you sure you want to delete ^name?" verification
         if ((^verification = "yes")) then
            delete := true
         else
            delete := false
         endif

         if (( not ^delete )) then
            args "^name not deleted."
         else
            dlf ^name -l
         endif
         # End of script



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026