#echo
You may reference an environment variable specified in an earlier #set or #setenv directive in this way:
#include [/bin/echo "$foo"]which would have the same effect as the line
barassuming you had set foo equal to "bar" in an earlier #set or #setenv directive.
Alternatively, you could use the #echo directive:
#echo "$foo"This would be useful to achieve a form of crude parameter passing to #include files.
For example, suppose you manage a Web site, and you have a common header #include file that is mainly identical across all of your pages except for a few details, such as the page title. If you set the environment variable $title with the directive
#set title = "ACME Widgets: Product Information"you may subsequently reference $title in the header #include file with the directive
#echo "<title>$title</title>"After all preprocessing, the line would effectively be
<title>ACME Widgets: Product Information</title>See the pikt.org website for demonstrations of this advanced technique.
![]() | 1st page | next page ![]() |