Discussion Locked

Unix to NT command translations

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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?

1 reply

by skizz

Not being a windows person, the only thing I can suggest is to find out what NT can do (to give you a log with a timestamp name) and then modify the Unix script to copy what that looks like.

This discussion is closed to new replies.