Filters out repeated adjacent results.
The uniq command works as a filter on the search results that you pass into it. It removes any search result if it is an exact duplicate with the previous result. This command does not take any arguments.
Note: We don't recommend running this command against a large dataset.
Example 1: Keep only unique results from all web traffic in the past hour.
eventtype=webtraffic earliest=-1h@s | uniq
Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the uniq command.
This documentation applies to the following versions of Splunk: 4.1 , 4.1.1 , 4.1.2 , 4.1.3 , 4.1.4 , 4.1.5 , 4.1.6 , 4.1.7 , 4.1.8 , 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 , 4.3.1 , 4.3.2 , 4.3.3 , 4.3.4 , 4.3.5 , 4.3.6 , 5.0 , 5.0.1 , 5.0.2