<?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 to concat all rows in a single field able and use the result in another &amp;quot;search port IN&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536863#M151766</link>
    <description>&lt;P&gt;it works well. Can you explain a bit how you've fixed it?&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jan 2021 17:16:30 GMT</pubDate>
    <dc:creator>vsasdao</dc:creator>
    <dc:date>2021-01-22T17:16:30Z</dc:date>
    <item>
      <title>How to concat all rows in a single field able and use the result in another "search port IN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536822#M151759</link>
      <description>&lt;P&gt;In my Search 1, it will list all unique port numbers associated with a certain IP address, i.e. 1.2.3.4&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;"MYTOKEN is: fcd4e600-eda2-4ee0-a3b3-093562f49c2e" | rex "1.2.3.4:(?&amp;lt;ipport&amp;gt;.*?) " | dedup ipport | table ipport | table ipport&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;And then I'd like to concatenate those ports into one long string delimitated with "," that is, "57432, 57453,57198" and finally this concatenated string will be used in another search, i.e&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;"https_client-init &amp;lt;HTTP_REQUEST&amp;gt;: " | rex "2.3.4.5:(?&amp;lt;port&amp;gt;.*?) " | search port IN([search "MYTOKEN is: fcd4e600-eda2-4ee0-a3b3-093562f49c2e" | rex "1.2.3.4:(?&amp;lt;ipport&amp;gt;.*?) " | dedup ipport | table ipport | table ipport])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be really appreciated if someone could shed the light of how it can be solved. thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 12:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536822#M151759</guid>
      <dc:creator>vsasdao</dc:creator>
      <dc:date>2021-01-22T12:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to concat all rows in a single field able and use the result in another "search port IN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536823#M151760</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230764"&gt;@vsasdao&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try below query;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"https_client-init &amp;lt;HTTP_REQUEST&amp;gt;: " | rex "2.3.4.5:(?&amp;lt;port&amp;gt;.*?) " | search  [search "MYTOKEN is: fcd4e600-eda2-4ee0-a3b3-093562f49c2e" | rex "1.2.3.4:(?&amp;lt;port&amp;gt;.*?) " | dedup port | fields port]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you an upvote is appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 12:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536823#M151760</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-22T12:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to concat all rows in a single field able and use the result in another "search port IN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536863#M151766</link>
      <description>&lt;P&gt;it works well. Can you explain a bit how you've fixed it?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 17:16:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536863#M151766</guid>
      <dc:creator>vsasdao</dc:creator>
      <dc:date>2021-01-22T17:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to concat all rows in a single field able and use the result in another "search port IN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536922#M151782</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;Subsearches formats the results &lt;SPAN&gt;into a single linear search string. You can this string by running the subsearch by adding "| format" command at the end. I changed field name to port to create suitable search string from subsearch.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can find more detail in below doc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/8.1.2011/Search/Changetheformatofsubsearchresults" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/8.1.2011/Search/Changetheformatofsubsearchresults&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 13:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-concat-all-rows-in-a-single-field-able-and-use-the-result/m-p/536922#M151782</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-23T13:23:38Z</dc:date>
    </item>
  </channel>
</rss>

