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

See "INPUT FILE SYNTAX" in Text::Vpp.

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 Don't forget to escape shell sensitive characters.

-varFile FileName

Specify a file (name FileName) which holds an 'external' representation of a hash as it is created by Perl's Data::Dumper module. Example: $People = { 'person' => { 'nick' => 'Larry', 'name' => 'Larry Wall', 'address' => { 'street' => 'nirwana', 'city' => 'Perl.Org', 'zip' => '007' } }, 'pumpkin' => { 'nick' => 'Guru', 'name' => 'Sarathy Gurusamy', 'address' => { 'state' => 'Madison', 'zip' => '008' } } };

-action 'char'

Enables the user to use different char as action char. (default @) Don't forget to escape shell sensitive characters.

Example: -action '#' will enable vpp to understand #include, #ifdef ..

-comment 'char'

Enables the user to use different char as comment char. (default #) Don't forget to escape shell sensitive characters.

-nocomment

no comments are possible.

-prefix 'char'

Enables the user to use different char(s) as prefix char(s), i.e. variables in your text (only) are prefixed by that character(s) instead of the default '$'. If no suffix character(s) has been defined (or set to 'undef') variables may be specified in the form ${variable} where '$' is the current prefix char(s). This form is necessary, if any character which is allowed within a name (regexp '\w') immediately follows the variable. Note, that all variables in 'actions' (like @@ @EVAL @FOREACH @IF) must still be prefixed by '$'. Don't forget to escape shell sensitive characters.

-suffix 'char'

Enables the user to use different char(s) as suffix char(s), i.e. variables in your text (only) are suffixed by that character(s). Note, that all variables in 'actions' (like @@ @EVAL @FOREACH @IF) don't use this. Don't forget to escape shell sensitive characters.

-substitute /prefix/suffix/

Enables the user to specify the prefix and suffix used to mark a Perl expression within the text that will be replaced by its value. The default value is twice the 'action' char as suffix and prefix. Instead of '/' any other non space character can be used. Don't forget to escape shell sensitive characters.

-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 STDOUT
 You may prefix the filename with >> to get the output
 appended to an existing file.

AUTHOR

Dominique Dumont Dominique_Dumont@grenoble.hp.com

Copyright (c) 1996-2001 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, Text::Vpp