LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

having fun with bash varaibles: indirect variable references

Posted 11-28-2009 at 02:38 PM by lumak (Lumak's Guide to Random Things)
Updated 11-28-2009 at 03: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 6146 Comments 2 lumak is offline

  



All times are GMT -5. The time now is 10:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration