home *** CD-ROM | disk | FTP | other *** search
/ The HTML Web Publisher's Construction Kit / HTMLWPCK.ISO / unix / cgi / echoname.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1995-07-11  |  535 b   |  23 lines

  1. #!/bin/sh
  2. # this script will echo the user's name, the user's host machine
  3. # and the name of the server running this script
  4.  
  5. echo Content-Type: text/html
  6. echo
  7.  
  8. echo "<HTML><HEAD><TITLE>Echoname Example</TITLE></HEAD><BODY>"
  9. echo "<ISINDEX>"
  10. echo "<H1>CGI script example</H1>"
  11. echo Any name typed into the query window will be echoed to the screen.
  12. echo "<HR>"
  13.  
  14. if [ $# = 0 ]; then
  15.     echo "Please enter your name in the query window.<BR>"
  16. else
  17.     echo Hello $* from $REMOTE_HOST, Welcome to $SERVER_NAME.\<BR\>
  18. fi
  19.  
  20. echo "</BODY></HTML>"
  21.  
  22.  
  23.