I am trying to write a script which will find the unique lines(first occurance) based on columns/delimiters. In this case to my understanding delimiter is ":".
for example:
May 14 00:00:01 SERVER1 ntp[1006]: ntpd[Info]: 1430748797.780852: ndtpq.c(20544): this is the log
May 14 00:00:01 SERVER1 ntp[1006]: ntpd[Info]: 1430748797.780853: ndtpq.c(20544): this is another log
May 14 00:00:02 SERVER1 ntp[1006]: ntpd[Info]: 1430748798.780852: ndtpq.c(20544): this is another log
May 14 00:00:03 SERVER1 ntp[1006]: ntpd[Info]: 1430748799.780852: ndtpq.c(20544): this is the log
May 14 00:00:04 SERVER1 ntp[1006]: ntpd[Info]: 1430748800.780852: ndtpq.c(20544): this is the log
May 14 00:00:04 SERVER1 ntp[1006]: ntpd[Info]: 1430748800.790852: ndtpq.c(20544): this is the log
May 14 00:00:05 SERVER1 ntp[1006]: ntpd[Info]: 1430748801.790852: ndtpq.c(20544): thisis really different log
desired output:
May 14 00:00:01 SERVER1 ntp[1006]: ntpd[Info]: 1430748797.780852: ndtpq.c(20544): this is the log
May 14 00:00:01 SERVER1 ntp[1006]: ntpd[Info]: 1430748797.780853: ndtpq.c(20544): this is another log
May 14 00:00:05 SERVER1 ntp[1006]: ntpd[Info]: 1430748801.790852: ndtpq.c(20544): thisis really different log
I am able to find the uniq log using the following command but ,I am loosing the timestamp by using this way.
cat fileName |awk -F: '{print $7}'