Next: , Previous: Modes of Operation, Up: Modes of Operation


1.2.1 Filter Mode

In filter mode, the argument to the function given by the virtual code is taken from standard input, and the result is written to standard output, except for error messages resulting from a failure to evaluate the function, which are written to standard error. See Diagnostics. Filter mode is indicated whenever these three conditions are all met.

Examples:

avram mynewapp < inputfilename
In this example, filter mode is recognized by default because there are no options or input files on the command line to indicate otherwise. (The input file redirected into standard input is not treated by the shell as a command line argument.)
cat somefile | avram -r coolprog > outputfile
In this example, the -r option gives it away, being one of the filter mode options, in addition to the fact that there are no input file parameters or application-specific options.
avram -u devilmaycare.avm --bogusoption ignoredparameter
In this case, filter mode is forced by the -u option despite indications to the contrary.