I?m looking for a simple solution to a simple question.
Recently, I wanted to have a log of every time I received a status change event for a SNMP Manager I’m using.
The solution for both NT and Unix was identical:
echo ?nodename TIME/DATE event_message? >> /log/err_log
Every time an event was received, the Event Message text was added as a new line in the /log/err_log.
This worked great, until my criteria changed. Now I want a new log for everyday, so that I can generate daily reports. The Unix solution was simple:
echo ?nodename TIME/DATE event_message? >> /log/err_log`date +%m%d%y`
Now, each day events create an error log file that includes a datestamp as part of the name, (i.e. /log/err_log030701).
The problem is that there seems to be no equivalent command in the NT command line. Anyone have a clue on how to accomplish in NT what is so easy in Unix?