I have 2 question: 1- I'm looking for a script (perl or other) to scan a file to find unique line (line that are duplicate will be remove) 2- Also want to know which log rotation people are using under Solaris ?? Answer soon! Thanx! Kéven Belanger Analyste en solutions de sécurité Logicon Inc. - Division Sécurité 819.825.8049 x7717 800.567.6399 x7717
On Thu, 22 Aug 2002, Keven Belanger wrote:
1- I'm looking for a script (perl or other) to scan a file to find unique line (line that are duplicate will be remove)
Under Linux and SCO (my only systems I have at hand), there is a command called 'uniq'. Check it's man page for the options to skip the start fields (timestamp or whatever you wish), and to specify showing only unique lines. -- Bradley Hartin - bhartin@straus-frank.com Communications and Network Administrator Straus-Frank Company
On Thu, Aug 22, 2002 at 02:37:48PM -0500, bhartin@straus-frank.com wrote:
On Thu, 22 Aug 2002, Keven Belanger wrote:
1- I'm looking for a script (perl or other) to scan a file to find unique line (line that are duplicate will be remove)
Under Linux and SCO (my only systems I have at hand), there is a command called 'uniq'. Check it's man page for the options to skip the start fields (timestamp or whatever you wish), and to specify showing only unique lines.
uniq won't help much with messages with different times, and when different PIDs are reported, or different mail message IDs, etc. You can script up something that ignores timestamps, PIDs, message IDs, etc. I've written such a beast, and posted it to the web. It's on the same website as the syslog-ng FAQ. http://www.campin.net/newlogcheck.html#newlogcheck -- "The IBM compatible sector has not yet recognized that 95% of computer usage is devoted to experimenting with different fonts and character styles in documents." - Reiner, Ron
participants (3)
-
bhartin@straus-frank.com
-
Keven Belanger
-
Nate Campi