File:  [NetBSD Developer Wiki] / wikisrc / templates / programlisting.mdwn
Revision 1.4: download - view: text, annotated - select for diffs
Wed May 12 15:32:14 2010 UTC (10 years, 11 months ago) by jym
Branches: MAIN
CVS tags: HEAD
Small improvement.

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

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