![]() |
|
|
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 |
| how to generate html file using script? | kittusri9 | Shell Programming and Scripting | 2 | 05-26-2008 12:38 AM |
| awk script to search an html file and output links | kyris | Shell Programming and Scripting | 8 | 05-11-2008 05:25 AM |
| How do I extract text only from html file without HTML tag | los111 | UNIX for Dummies Questions & Answers | 4 | 11-28-2007 04:40 AM |
| Accessing a log file from html, coldfusion script | skrules | UNIX for Dummies Questions & Answers | 1 | 10-30-2007 01:15 PM |
| html - df -k cgi script | frustrated1 | Shell Programming and Scripting | 1 | 12-09-2005 10:36 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
cgi script to echo a html file
Hi,
I'm learning some simple cgi scripting. I can make a script like this, so my browser shows "Hello World" /www/cgi-bin/name.sh --- #!/bin/sh MyName=World echo "<html> Hello $MyName </html>" --- What I'd like is to have a separate html and script files in the cgi folder so the script generates variables that are used in the html Something like: /www/cgi-bin/name.sh --- #!/bin/sh MyName=World cat name.html --- and /www/cgi-bin/name.html <html><h1>Hello $MyName<br> </form></body></html> --- Now this does not work as cat doesn't replace the varaible. I've also tried a looped echo of the html file but again that doesn't work. So my question, how to most elegantly do this ? It would be cool to have a general solution that could replace many variables in the html file. Many Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|