THis might be helpful:
get_postvar()
{
# Output the content of a specific variable that was inside POST DATA.
#
# The variable to query is given to this function as $1
#
# NB: Busybox's grep command does not have the -x option to match whole
# lines. So we have had to use a kludge to get around this limitation.
#
# head -n1 is to ensure that only one line of output is given. It should
# never even produce output over one line, unless a duplicate variable
# exists; in which case, this will eliminate all but the first match.
gpvdata=$(echo "$postdata" | grep "$1=" | cut -f2- -d= | head -n1)
httpd -d "$gpvdata"
# echo "$gpvdata" | head -c$((`echo "$gpvdata" | wc -c`-2))
return
}