Cgi koodinäiteid
Shelli skript, mis kuvab kataloogi listingu:
#!/bin/sh echo 'content-type: text/html' echo echo ' uus ok leht olemas ' echo '<pre>' ls -l echo '
'
Pythoni skript, mis trükib ühe sõna kolm korda:
#!/usr/bin/python def foo(): print "<p>miskijutt</p>" print "content-type: text/html" print print "ok !! jalle olemas" foo() foo() foo()