[Pmwiki-users] Trying to post a Shell Script

Patrick R. Michaud pmichaud
Thu Jan 20 22:28:20 CST 2005


On Thu, Jan 20, 2005 at 09:59:33PM -0500, Neil Herber wrote:
> At 2005-01-20  04:55 PM -0800, Menachem Shapiro is rumored to have said:
> >If I post it in between [=...=] tags, It ends up posting the whole
> >script as one long line.
> 
> Put a single blank space at the start of each line.

Even better, put a space at the beginning of the line containing the [=.
For example:

   [=
#!/bin/bash

echo this is my shell script
# and comments work here
# and don't become lists
=]


Note the space before the [= !

This will use monospace text for the code, honor the newlines inside of 
the [=...=], and not do any wiki markup processing of the things 
inside of the [=...=].  Indeed, this is frequently used on pmwiki.org
whenever it needs to display code excerpts.

It's also described at http://www.pmwiki.org/wiki/PmWiki/TextFormattingRules,
in the section on "Escape Sequence", and I think it's described
a few other places as well.  

Pm




More information about the pmwiki-users mailing list