<?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: Remove first four lines of field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456553#M129054</link>
    <description>&lt;P&gt;If the number of logs is large, it is slow.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search)|streamstats count by rec_no
|eval CA7_TERMINAL_ID=if(rec_no&amp;lt;5,"",CA7_TERMINAL_ID)
|eval CA7_OPERATOR_ID=if(rec_no&amp;lt;5,"",CA7_OPERATOR_ID)
|eval CA7_DATE=if(rec_no&amp;lt;5,"",CA7_DATE)
|eval CA7_TIME=if(rec_no&amp;lt;5,"",CA7_TIME)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Jul 2018 14:46:45 GMT</pubDate>
    <dc:creator>HiroshiSatoh</dc:creator>
    <dc:date>2018-07-24T14:46:45Z</dc:date>
    <item>
      <title>Remove first four lines of field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456551#M129052</link>
      <description>&lt;P&gt;I want to display each event's raw text in a table column, but I need to remove the first four lines of the field (terminal_id, operator_id, date, and time lines). Is there a way I can always 'hide' the first four lines of the field before displaying it in a dashboard table at searchtime?&lt;/P&gt;

&lt;P&gt;This is what the field looks like:&lt;BR /&gt;
 CA7_TERMINAL_ID= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_OPERATOR_ID= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_DATE= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_TIME= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_TRANSACTION= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_JOB= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_SYSTEM= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_DESC=  data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_ACTIVE_SIZE=data here !&lt;BR /&gt;&lt;BR /&gt;
 CA7_PROGRAM= data here!&lt;BR /&gt;&lt;BR /&gt;
 CA7_MESSAGE= data here!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456551#M129052</guid>
      <dc:creator>calarie001</dc:creator>
      <dc:date>2020-09-29T20:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Remove first four lines of field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456552#M129053</link>
      <description>&lt;P&gt;Hi calarie001,&lt;BR /&gt;
in you dashboard panels do you use table command to define which fields to display or do you display raw data?&lt;BR /&gt;
In the first case you can choose which fields to display&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| table CA7_TIME CA7_TRANSACTION CA7_JOB CA7_SYSTEM CA7_DESC CA7_ACTIVE_SIZE CA7_PROGRAM CA7_MESSAGE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 14:41:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456552#M129053</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-07-24T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remove first four lines of field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456553#M129054</link>
      <description>&lt;P&gt;If the number of logs is large, it is slow.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search)|streamstats count by rec_no
|eval CA7_TERMINAL_ID=if(rec_no&amp;lt;5,"",CA7_TERMINAL_ID)
|eval CA7_OPERATOR_ID=if(rec_no&amp;lt;5,"",CA7_OPERATOR_ID)
|eval CA7_DATE=if(rec_no&amp;lt;5,"",CA7_DATE)
|eval CA7_TIME=if(rec_no&amp;lt;5,"",CA7_TIME)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 14:46:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456553#M129054</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2018-07-24T14:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Remove first four lines of field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456554#M129055</link>
      <description>&lt;P&gt;It really, really, really, really helps to see you raw events and your search.  Because you keep referring to this dataset as a &lt;CODE&gt;field&lt;/CODE&gt; I am assuming that this is a single event and that you need to strip out that data.  This seems unlikely but...&lt;/P&gt;

&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here
| rex field=YourFieldNameHere mode=sed "s/^.*?CA7_TIME=[^\n\r\s]+//"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 15:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-first-four-lines-of-field/m-p/456554#M129055</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-24T15:42:09Z</dc:date>
    </item>
  </channel>
</rss>

