version 1.1, 2010/05/12 14:44:35
|
version 1.3, 2010/05/12 15:25:22
|
Line 1
|
Line 1
|
<div class="programlisting"> |
<div class="programlisting"> |
<div> |
<pre><tt> |
<TMPL_VAR text> |
|
</div> |
|
</div> |
|
<TMPL_UNLESS NAME="text"> |
|
|
|
## Description |
|
|
|
Use this template to display a program listing, or a succession of commands (together with their output). |
|
|
|
Remember that shell commands may be prefixed by: |
|
* *$* when the command should be run as a normal user |
|
* *#* when the command should be run as root |
|
|
|
* *text* - text to display as program listing. |
|
|
|
## Examples |
|
|
|
[[!template id=programlisting text=""" |
|
$ uname |
|
NetBSD |
|
$ cd /bin |
|
$ ls |
|
[ cpio domainname kill mt rcmd sleep |
|
cat csh echo ksh mv rcp stty |
|
chio date ed ln pax rm sync |
|
chmod dd expr ls ps rmdir tar |
|
cp df hostname mkdir pwd sh test |
|
"""]] |
|
|
|
is obtained with: |
|
|
|
\[[!template id=programlisting text=""" |
|
$ uname |
|
NetBSD |
|
$ cd /bin |
|
$ ls |
|
[ cpio domainname kill mt rcmd sleep |
|
cat csh echo ksh mv rcp stty |
|
chio date ed ln pax rm sync |
|
chmod dd expr ls ps rmdir tar |
|
cp df hostname mkdir pwd sh test |
|
"""]] |
|
|
|
</TMPL_UNLESS> |
|
|
|
|
|
|
|
<div class="programlisting"> |
|
<TMPL_VAR text> |
<TMPL_VAR text> |
|
</tt></pre> |
</div> |
</div> |
<TMPL_UNLESS NAME="text"> |
<TMPL_UNLESS NAME="text"> |
|
|