<?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: Count by start of string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561204#M159511</link>
    <description>&lt;LI-CODE lang="markup"&gt;index ="main" |eval Text=substr(Text,1,4)|stats count by Text |sort -count | table count Text&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 28 Jul 2021 14:48:26 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-07-28T14:48:26Z</dc:date>
    <item>
      <title>Count by start of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561202#M159510</link>
      <description>&lt;P&gt;I have an query that&lt;/P&gt;&lt;P&gt;index ="main" |stats count by Text |sort -count | table count Text&lt;/P&gt;&lt;P&gt;results:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;count&lt;/TD&gt;&lt;TD width="50%"&gt;Text&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;10&lt;/TD&gt;&lt;TD width="50%"&gt;dog fish&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;20&amp;nbsp;&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp; dog cat&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I change the compare that compare first X chars into Text , for example first 4 chars , so "dog fish" and "dog cat" will be 1 line?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;count&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;Text&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;30&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;dog .....&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561202#M159510</guid>
      <dc:creator>kooojo</dc:creator>
      <dc:date>2021-07-28T14:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count by start of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561204#M159511</link>
      <description>&lt;LI-CODE lang="markup"&gt;index ="main" |eval Text=substr(Text,1,4)|stats count by Text |sort -count | table count Text&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561204#M159511</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-28T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count by start of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561207#M159513</link>
      <description>&lt;P&gt;And how can I add "..." as a suffix ?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 14:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561207#M159513</guid>
      <dc:creator>kooojo</dc:creator>
      <dc:date>2021-07-28T14:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Count by start of string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561211#M159515</link>
      <description>&lt;P&gt;update Text eval&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|eval Text=substr(Text,1,4)."...."&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 15:06:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-by-start-of-string/m-p/561211#M159515</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-28T15:06:30Z</dc:date>
    </item>
  </channel>
</rss>

