According to a couple of sources, GeSHi, and hence Dokuwiki, should be able to do syntax highlighting of awk scripts. Awk is in the
list of supported languages. It's also one of the options in the demonstration box on the
GeSHi page. In fact, if I put my little script into their demo box, it does proper highlighting. It doesn't work in Dokuwiki, though, so far as I can tell. Can anyone verify this problem? Even better, are there any solutions? So far, my forum searches for "awk" have turned up several instances of the word "awkward", but nothing of use to this problem.
For reference, this is what I put into my wiki:
<code awk>
#!/usr/bin/awk -f
## Command Syntax:
## ./group_extract.awk -v F1="num1" -v F2="num2" -v sep="field_separator" file(s)
## where num1 and num2 are integers and field_separator is, surprisingly,
## the field separator
## Example: ./group_extract.awk -v F1="2" -v F2="5" -v sep="," data_file.csv
BEGIN {
FS = sep
}
{
group[$F1] = group[$F1] $F2 "\n"
}
END {
for ( i in group )
{
gsub("\n$","",group[i])
printf i","
print group[i] | "/root/scripts/stats"
close("/root/scripts/stats")
}
}
</code>