Bash/CGI

From Linux Hints

Jump to: navigation, search

Bash perhaps isn't as suited as Perl, Python or others to CGI scripting, but you can still do it effectively.

Probably the first thing you want to know is that the variable QUERY_STRING contains the parameters passed to your script. You should also note the value of $PATH will be more limited than for normal commands at a shell. You probably want:

PATH=$PATH:/sbin

Or refer to commands by their full path.

related