<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I perform this awk command in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11821#M844</link>
    <description>&lt;P&gt;The clause "stats count by src_ip | sort -count" can be replaced with "top src_ip".  The difference is that the "top" command will also add a "percent" field to the results.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:11:36 GMT</pubDate>
    <dc:creator>Johnvey</dc:creator>
    <dc:date>2020-09-28T09:11:36Z</dc:date>
    <item>
      <title>How do I perform this awk command in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11819#M842</link>
      <description>&lt;P&gt;I would like to use the following cmd in splunk and I am getting errors. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;egrep "Failed password" auth.log | awk '{print $13}' | sort | uniq -c | sort -rn | less
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;(cross-posted from &lt;A href="http://www.splunk.com/support/forum%3aSplunkReporting/4289" rel="nofollow"&gt;forums&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2010 08:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11819#M842</guid>
      <dc:creator>Johnvey</dc:creator>
      <dc:date>2010-04-20T08:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform this awk command in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11820#M843</link>
      <description>&lt;P&gt;try something along the lines of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=auth.log Failed password | rex "(?&amp;lt;src_ip&amp;gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})" | stats count by src_ip | sort -count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this should produce a table of ip addresses and the count of the time they were in the logfile.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2010 09:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11820#M843</guid>
      <dc:creator>cfield</dc:creator>
      <dc:date>2010-04-20T09:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform this awk command in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11821#M844</link>
      <description>&lt;P&gt;The clause "stats count by src_ip | sort -count" can be replaced with "top src_ip".  The difference is that the "top" command will also add a "percent" field to the results.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11821#M844</guid>
      <dc:creator>Johnvey</dc:creator>
      <dc:date>2020-09-28T09:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I perform this awk command in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11822#M845</link>
      <description>&lt;P&gt;One caveat though, top will truncate the result set based on the limit= parameter, you would have to use limit=0 to get the same results.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2010 22:54:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-this-awk-command-in-Splunk/m-p/11822#M845</guid>
      <dc:creator>cfield</dc:creator>
      <dc:date>2010-05-10T22:54:56Z</dc:date>
    </item>
  </channel>
</rss>

