LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

having fun with bash varaibles: indirect variable references

Posted 11-28-2009 at 01:38 PM by lumak (Lumak's Guide to Random Things)
Updated 11-28-2009 at 02:59 PM by lumak

Well I recently started messing around with bash scripts as cgi scripts and was wondering how to pass variables in and what not.

Well it turns out, Apache will define the variable $QUERY_STRING which will contain everything after the first question mark. You can then pars this string to define variables. The general format is "name1=val1&name2=val2". It turns out you can actually declare variables in bash using 'declare' and parameter expansion.

...
Attached Files
File Type: txt cgi_vars.txt (2.4 KB, 529 views)
Member
Views 15017 Comments 2 lumak is offline

  



All times are GMT -5. The time now is 01:32 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration