BASH - Log specific output to a log.txt file
Hi,
I was wondering if it is possible to write a script that will ping a specific target and if there will be no response (Timeout) it will log the timeout to a text file with a time stamp. Your help is much appreciated :) |
Possible sure. Also depends on your skill. And as well a choice of scripting language to use.
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/ should get you started if you want to use BASH. You could also use perl as its installed on most linux distributions per default. As soon as you have your script maybe use cron to have it run on a schedule. If you are stuck with any of this try man cron or man crontrab on a command line. Example bash script Quote:
|
Quote:
|
All times are GMT -5. The time now is 10:55 PM. |