Salve io ho realizzato un semplicissimo form del tipo
codice:
<HTML>
<BODY>
<FORM action="/cgi-bin/maurizio.cgi" METHOD="POST">
<input type=text name=alfa>

<input type=text name=beta>

<input type=submit name=bottone value="INVIA">
</FORM>
</BODY>
</HTML>
vorrei sapere come posso realizzare una cgi che mi stampi a video i valori di alfa e beta derivati dalla decodifica dell url io ho provato a usare anche la bash..
codice:
#!/bin/bash

function getkey()
{
       echo "$query" | tr '&' '\n' | grep "^$1=" | head -1 | sed "s/.*=//" | ./urldecode 
}

if [ "$REQUEST_METHOD" = POST ]; then
               query=$( head --bytes="$CONTENT_LENGHT")
       else

               query="$QUERY_STRING"
fi
echo "Content-Type: text/html"
echo "Query=$query"
alfa=$( getkey alfa)
beta=$( getkey beta)
echo "Alfa=$alfa"
echo "Beta=$beta"
ma mi da un problema del tipo "malformed haeder script"

grazie mille...