Onecho and Offecho

Top  Previous  Next

Sends multiple subsequent lines to an external file called externalfile.  The action is stopped by an $offecho.  This command are used employing the syntax

 

$Onecho  > externalfile

line 1 to send

line 2 to send

$Offecho

or

$Onecho  >> externalfile

line 1 to send

line 2 to send

$Offecho

 

There is also a variant $onechos that permits parameter substitution as $onecho also does and $onechov that forbids parameter substitution.

 

$Onechos  > externalfile

line 1 to send with param sub %it%

line 2 to send

$Offecho

Notes

$Echo allows one to send single lines of text.
Both the text and the file name can be quoted or unquoted.
When a path is not included the file by default will be placed in the working directory.
The file is not closed until the end of the compilation or when a $call or any kind of $include statement is encountered.
The redirection symbol > causes any files with the same name to be overwritten.
The redirection symbols >> causes any files with the same name to be appended to.
Parameter substitution is discussed in the Conditional Compilation chapter.