akfquery(1) General Commands Manual akfquery(1) NAME akfquery - use form data via CGI in shell scripts SYNOPSIS akfquery field_name [alternative] DESCRIPTION With the program akfquery you can use forms with the GET-method in shell scripts. A field_name must be provided. The program outputs the decoded field value to the standard output. If the field doesn't exist or if it is empty, then it outputs the alternative, if given. Otherwise the output is empty. If the field has multiple values, the program outputs multiple lines. This can happen for example with checkboxes. Special HTML-characters (<>&"') are converted to HTML-enities. Warning Shell scripts are suitable for quick temporary solutions or drafts in local, private networks. But they shouldn't be used for productive work on the open Internet. ENVIRONMENT QUERY_STRING contains the form data with the method GET EXAMPLES # save in variable for reuse name=$(akfquery name "unknown") echo "
Hello $name.
" # for single use output you can directly include it # the line breaks don't really matter for HTML echo "age:" akfquery age echo "
" # hobby is done with checkboxes echo "