Web server checker
Make a script which checks whether or not a web server is running on a certain machine. If so, check that it a decent server, not something from M$. If you should come across a sloppy server, send a message to that servers webmaster, informing that person about the existence of some fine alternative web servers.
- The first argument to the command should be the servername to check, it's IP address or DNS name.
- Check if a service is running by telnetting to the wel-known port for this service. Find a way to interupt the telnet command, otherwise you have to manually make your script move on to the next command, pressing enter while it is executing.
- Put this first check in a function, to keep things readable.
- Read the section SHELL GRAMMAR if you have trouble with the if statements for checking on the content of your variables.
Check it out!.