interp(1)

Section: (1)
Updated: 2009-07-12

NAME

interp - Simple Interpreter for Embedded Computers

SYNOPSIS

interp [OPTIONS] [SCRIPT ARGS]

DESCRIPTION

This build of interp is specifically for POSIX-compatible systems, including embedded linux. The enviroment-specific features are limited to the command line interface, and include capabilities that make it easier to use an interpretive language as one part of a larger entity such as scripts and programs. These features make it possible to load function definitions from multiple files, pass one-line command strings, and run in a batch mode (non-interactive.)

OPTIONS

-c commands
Execute a command string ("one-liner") as if it had been typed at the keyboard, with this restriction: no outer interpreter directives ("#" in column one.) If the interp commands include embedded whitespace, the whole command string must be surrounded with quotation marks. If the command string includes special characters usually interpreted by the shell, they must be escaped with "\".
-f filename
Read commands from the specified file until the end-of-file (EOF) is encountered. There are no restrictions on the use of language facilities (directives, macros, and in-line comments are allowed.) Generally this is the best way to load definitions into interp before the user gets the prompt.
-C
Allows you to continue executing after an error when reading redirected input. This option is useful for testing interp.
-q
Stop executing after errors when reading redirected input or when reading from a file (see "-f" option above.)
-h
Display usage and quit.
-l
Echo any redirected input (or "-c" command strings.)
-N
Request that interp quit after processing all the command line options. This is non-interactive mode. Because the program doesn't quit until all the options have been processed, if this is the first option, it won't block script arguments.
-n
Disable verbose-style error messages.
-V
Display version and build info and quits.
-v
Enable verbose error messages. Show the segment of code where the error occurred and other information that may be helpful to script developers.

SCRIPT ARGS

A list of whitespace-separated arguments that are to be handled by your interp code. Individual arguments may be quoted on linux/unix. Arguments that begin with a dash aren't supported. Arguments with embedded whitespace must be quoted.

NOTES

AUTHOR

Duane L. King, esq. <kingdl802@gmail.com>