File:  [NetBSD Developer Wiki] / wikisrc / templates / programlisting.mdwn
Revision 1.6: download - view: text, annotated - select for diffs
Wed May 12 16:33:34 2010 UTC (3 years, 11 months ago) by jym
Branches: MAIN
CVS tags: HEAD
Correct shell command list.

<pre class="programlisting"><TMPL_VAR text></pre>
<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>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb