![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 01:25 PM |
| Why generate "ash and bash" different output for same bash script? | s. murat | Shell Programming and Scripting | 0 | 05-26-2008 08:19 AM |
| Wrapping Your Brain Around Oracle + Python | iBot | Oracle Updates (RSS) | 0 | 04-06-2008 06:10 AM |
| Wrapping ksh script | nir_s | Shell Programming and Scripting | 2 | 05-30-2006 03:37 AM |
| Line wrapping problem when using awk | placroix1 | Shell Programming and Scripting | 1 | 05-10-2005 12:44 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Wrapping a bash script for CGI
I hope its ok to start a new thread, I was going to use my existing one but thought a new one would better clarify things and provide better search for future reference.
Well I have my bash program working now, all nice, user input validated, output formatted, everything is looking sexy. Now the guys tell me that they don't want telnet access to the server, grrrrrrr! I have to make an idiot proof web interface. So I need to choose a way to go. As I see it I can either re-write the whole thing in perl or somehow 'wrap' my bash into a cgi interface. I've been thinking about the latter option and it seems non-trivial to me at this stage. On the face of it my thinking goes something like this pseudocode: 1) Spawn a copy of my bash script and background it& while[1] do 2) Take the standard output of the script and redirect it to a little HTML wrapper something like echo "content-type: text\/html \<html\> <body> $MYSTDOUTHERE \</html\>\</body\>" 3) process a POST request and send the relevant data to my backgrounded script done While I can express the concept clearly enough (I hope) the details are a bit fuzzy and I would welcome any input or comments before getting started. Is such a method possible/reliable/secure? The web interface would only be used by trusted administrators but I am worried enough about 'command substitution' in any situation where CGIs are involved, its my natural paranoid stance ![]() all best regards Andy |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|