<?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: Modifying CSV in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609891#M212082</link>
    <description>&lt;P&gt;Thanks bowesmana,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2022 12:31:50 GMT</pubDate>
    <dc:creator>majilan1</dc:creator>
    <dc:date>2022-08-18T12:31:50Z</dc:date>
    <item>
      <title>Is it possible to modify a portion of CSV file in inputlookup?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609881#M212076</link>
      <description>&lt;P&gt;Hi Every one,&lt;/P&gt;
&lt;P&gt;Is it possible to modify a portion of CSV file in inputlookup?&lt;/P&gt;
&lt;P&gt;Cheers.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 05:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609881#M212076</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-08-18T05:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609890#M212081</link>
      <description>&lt;P&gt;Are you looking to read the CSV, make some modifications and save it back again? If so, 2 approaches.&lt;/P&gt;&lt;P&gt;The first is to simply input, change as needed and then output, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup your.csv
| eval field_value=if(field_value="I want this field", "change me", field_value)
| outputlookup your.csv&lt;/LI-CODE&gt;&lt;P&gt;or you can use the lookup editor to manually edit the lookup&lt;/P&gt;&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/1724/" target="_blank"&gt;https://splunkbase.splunk.com/app/1724/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 00:22:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609890#M212081</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-18T00:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609891#M212082</link>
      <description>&lt;P&gt;Thanks bowesmana,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 12:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609891#M212082</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-08-18T12:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609894#M212083</link>
      <description>&lt;P&gt;this should do it&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;REMEMBER:&amp;nbsp; &amp;nbsp;if you plan to do this automatically - please make sure you have a backup copy of the original in case you get the SPL wrong first time!!!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup host_blackout.csv
| eval end_time=if(host IN ("mep1", "mep2", "mep3"), "08/28/2022 11:00", end_time)
| oututlookup host_blackout.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It sounds like you could also use the eval function 'relative_time()' to calculate the 'end of next week', e.g. like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup host_blackout.csv
| eval end_time=if(host IN ("mep1", "mep2", "mep3"), 
            strftime(relative_time(now(), "+2w@w7+11h"), "%m/%d/%Y %H:%M"),
            end_time)
| oututlookup host_blackout.csv&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which would make it 11am on Sunday in the week following&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 04:27:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609894#M212083</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-18T04:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609895#M212084</link>
      <description>&lt;P&gt;I get error in 'EvalCommand': the expression is malformed. Expected).&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 01:35:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609895#M212084</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-08-18T01:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying CSV</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609904#M212086</link>
      <description>&lt;P&gt;The eval 'case' statement was meant to be an 'if'. Fixed&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 04:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-modify-a-portion-of-CSV-file-in-inputlookup/m-p/609904#M212086</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-08-18T04:28:12Z</dc:date>
    </item>
  </channel>
</rss>

