Annotation of wikisrc/templates/programlisting.mdwn, revision 1.6
1.5 jym 1: <pre class="programlisting"><TMPL_VAR text></pre>
1.1 jym 2: <TMPL_UNLESS NAME="text">
3:
4: ## Description
5:
6: Use this template to display a program listing, or a succession of commands (together with their output).
7:
8: Remember that shell commands may be prefixed by:
1.6 ! jym 9:
! 10: * *$* when the command should be run as a normal user
! 11: * *#* when the command should be run as root
1.1 jym 12:
13: * *text* - text to display as program listing.
14:
15: ## Examples
16:
17: [[!template id=programlisting text="""
18: $ uname
19: NetBSD
20: $ cd /bin
21: $ ls
22: [ cpio domainname kill mt rcmd sleep
23: cat csh echo ksh mv rcp stty
24: chio date ed ln pax rm sync
25: chmod dd expr ls ps rmdir tar
26: cp df hostname mkdir pwd sh test
27: """]]
28:
29: is obtained with:
30:
31: \[[!template id=programlisting text="""
32: $ uname
33: NetBSD
34: $ cd /bin
35: $ ls
36: [ cpio domainname kill mt rcmd sleep
37: cat csh echo ksh mv rcp stty
38: chio date ed ln pax rm sync
39: chmod dd expr ls ps rmdir tar
40: cp df hostname mkdir pwd sh test
41: """]]
42:
43: </TMPL_UNLESS>
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb