#!/bin/sh -e exec 2>&1 printf "Content-type: text/plain\n\n" echo "Current directory:" pwd exec /path/to/dosomething