I think he wants to have a shell-script that can process upload-file- forms, displayed in browsers.
AFAIK, the general rule is: don't do that (CGI programming with shell- scripts).
Use something else (PHP as CGI, if you don't want to have mod_php).
Good to know, thanks for the info. I will probably go with PHP as it seems the simplest option.