#!/bin/sh echo 'Content-type: text/html' echo echo '(html)' echo '(head)(title)test(/title)(/head)' echo '(body)' echo '(h3)hi(/h3)' echo '(hr)' echo '(pre)' # You get the idea ... sed -n 's/(/(/g; s/)/)/g; p' test.cgi echo '(/pre)' echo '(/body)' echo '(/html)'