NAME
vpp - versatile text pre-processor
SYNOPSIS
vpp -var toto=1 file_in > file_out
#same result
vpp -var toto=1 -output file_out file_in
DESCRIPTION
vpp enables you to pre-process a file.
Note that vpp is not designed to replace the well known cpp.
INPUT FILE SYNTAX
Comments
All lines beginning with '#' are skipped. (May be changed with -comment option)
in-line perl eval
Lines beginning with '@EVAL' (@ being pompously named the 'action char') are evaluated as small perl script.
When -comment is used with '#' as a parameter, Vpp doesn't skip lines beginning with '#'. In this case, there's no comment possible.
Multi-line input
Line ending with \ are concatenated with the following line.
Variables substitution
You can specify in your text varaibles beginning with $ (like in perl). These variables can be set either by the -var option or by the "eval" capability of Vpp (See below).
Setting variables
Line beginning by @ are "evaled" using variables defined by -var. You can use only scalar variables. This way, you can also define variables in your text which can be used later.
Conditional statements
vpp understands @IF, @ELSIF, @ENDIF,and so on. @INCLUDES and @IF can be nested.
@IF and @ELSIF are followed by a string which will be evaled using the variable you defined (either with setVar() or in the text).
Inclusion
vpp understands @INCLUDE
command options
-var var_name=value
Specify variables that are used in the input file. The argument of the option must be written like var_name=var_value
-action 'char'
Enables the user to use another char as action char. (default @)
Example: -action '#' will enable vpp to understand #include, #ifdef ..
-comment 'char'
Enables the user to use another char as comment char. (default #)
-nocomment
no comments are possible.
-ignorebs
By default, line ending with '\' are glued to the following line (like in ksh). Once this method is called '\' will be left as is.
-output
Specify the output file name. defaults to STSOUT
AUTHOR
Dominique Dumont Dominique_Dumont@grenoble.hp.com
Copyright (c) 1996 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1), Text::Vpp(3)