<?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 how to get string differences between 2 columns in Security</title>
    <link>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463366#M10785</link>
    <description>&lt;P&gt;My query1 returns stats list and query2 is a subsearch that's retun another stats list. i added it with appendcols. &lt;BR /&gt;
I want to have another 2 columns, col3:not in col1 but in col2, col4:not in col2 but in col1. &lt;BR /&gt;
all columns are strings or alphanumeric.&lt;/P&gt;

&lt;P&gt;| rest /services/admin/LDAP-groups splunk_server=abc&lt;BR /&gt;
| mvexpand roles&lt;BR /&gt;
| search roles=admin_user&lt;BR /&gt;
| stats values(roles) as roles list(users) as admin_users1&lt;BR /&gt;
| appendcols&lt;BR /&gt;
[| rest /services/admin/LDAP-groups splunk_server=xyz&lt;BR /&gt;
| mvexpand roles&lt;BR /&gt;
| search roles=admin_user&lt;BR /&gt;
| stats list(users) as admin_users2]&lt;/P&gt;

&lt;P&gt;Result i looking(last 2 columns is what i am looking) &lt;/P&gt;

&lt;P&gt;admin_users1 admin_users2 admin(users1-users2) admin(users2-users1)&lt;BR /&gt;
A                       |A                       |B                                   |C&lt;BR /&gt;
B                       |C                       |D                                   |F&lt;BR /&gt;
D                       |E&lt;BR /&gt;
E                        |F                                                                                                      &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:55:27 GMT</pubDate>
    <dc:creator>shihabno</dc:creator>
    <dc:date>2020-09-30T01:55:27Z</dc:date>
    <item>
      <title>how to get string differences between 2 columns</title>
      <link>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463366#M10785</link>
      <description>&lt;P&gt;My query1 returns stats list and query2 is a subsearch that's retun another stats list. i added it with appendcols. &lt;BR /&gt;
I want to have another 2 columns, col3:not in col1 but in col2, col4:not in col2 but in col1. &lt;BR /&gt;
all columns are strings or alphanumeric.&lt;/P&gt;

&lt;P&gt;| rest /services/admin/LDAP-groups splunk_server=abc&lt;BR /&gt;
| mvexpand roles&lt;BR /&gt;
| search roles=admin_user&lt;BR /&gt;
| stats values(roles) as roles list(users) as admin_users1&lt;BR /&gt;
| appendcols&lt;BR /&gt;
[| rest /services/admin/LDAP-groups splunk_server=xyz&lt;BR /&gt;
| mvexpand roles&lt;BR /&gt;
| search roles=admin_user&lt;BR /&gt;
| stats list(users) as admin_users2]&lt;/P&gt;

&lt;P&gt;Result i looking(last 2 columns is what i am looking) &lt;/P&gt;

&lt;P&gt;admin_users1 admin_users2 admin(users1-users2) admin(users2-users1)&lt;BR /&gt;
A                       |A                       |B                                   |C&lt;BR /&gt;
B                       |C                       |D                                   |F&lt;BR /&gt;
D                       |E&lt;BR /&gt;
E                        |F                                                                                                      &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463366#M10785</guid>
      <dc:creator>shihabno</dc:creator>
      <dc:date>2020-09-30T01:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to get string differences between 2 columns</title>
      <link>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463367#M10786</link>
      <description>&lt;P&gt;Can you give an example of the expected output?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 16:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463367#M10786</guid>
      <dc:creator>diogofgm</dc:creator>
      <dc:date>2019-08-23T16:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to get string differences between 2 columns</title>
      <link>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463368#M10787</link>
      <description>&lt;P&gt;Also, an image of the current output, and the additional columns you want to see. Annotate them to help us answer your question.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 17:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463368#M10787</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-23T17:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to get string differences between 2 columns</title>
      <link>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463369#M10788</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/admin/LDAP-groups splunk_server=abc
| mvexpand roles
| search roles=admin_user
| stats count by users | table users| eval from="admin_users1"
| append
[| rest /services/admin/LDAP-groups splunk_server=xyz
| mvexpand roles
| search roles=admin_user
| stats count by users | table users | from="admin_users2"]
| stats values(from) as from_combined by users
| eval type=case(mvcount(from_combined)=2,"admin_users1 admin_users2", from_combined="admin_users1","In user1 only", true(), "In user2 only")
| makemv type | mvexpand type 
| eval temp=1 
| table temp type users
| chart values(users) over temp by type
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 24 Aug 2019 00:54:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/how-to-get-string-differences-between-2-columns/m-p/463369#M10788</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-08-24T00:54:11Z</dc:date>
    </item>
  </channel>
</rss>

