[thelist] a stupid question: is it possible to process POST file uploading by shell script?

Zhang Weiwu zhangweiwu at realss.com
Wed Mar 8 18:29:28 CST 2006

在 2006-03-08三的 12:03 +0000,Christian Heilmann写道:
> > Hello. Recently I got a webspace that I can use to distribute my files. I
> > wish to write a script that handle an uploaded file and put it in a dictory.
> > The webspace support CGI but only allow shell script.
> >
> > Is it possible (and easy) to write a small upload file handling cgi shell
> > script? (I can use ksh, awk, sed, ls, cat ...)
> >
> > Any hint?
> CURL perchance?
> http://curl.haxx.se/

if I didn't make it wrong: curl can /send/ HTTP POST rather then parsing

In cgi the POST message is simply fed in as stdin and I think what I
need is something that can parse POST and take the file content out of

I wrote an awk script and so far this script works fine only with text
file. It seems to be treating uploaded files as text files and stopping
at the first EOF.

More information about the thelist mailing list