<?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: Using windows batch file to run search on CLI in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365773#M5426</link>
    <description>&lt;P&gt;Anyone have any ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Dec 2017 07:15:42 GMT</pubDate>
    <dc:creator>quahfamili</dc:creator>
    <dc:date>2017-12-27T07:15:42Z</dc:date>
    <item>
      <title>Using windows batch file to run search on CLI</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365772#M5425</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I was trying to use window batch file to run CLI search command. &lt;/P&gt;

&lt;P&gt;The command is something like this:&lt;BR /&gt;
splunk search "index=xx |eval xx| table xx xx xx" -output csv c:\test.csv&lt;/P&gt;

&lt;P&gt;This cmd like works when I manually key in on cmd prompt, but when I saved the file as a batch files or *.cmd, the command will only run : splunk search "index=xx &lt;/P&gt;

&lt;P&gt;I know the pipe in cmd needs to be escaped using caret (^|). However, it is not working even when I added the caret. &lt;/P&gt;

&lt;P&gt;Thanks in advance. &lt;BR /&gt;
AQ&lt;/P&gt;</description>
      <pubDate>Tue, 26 Dec 2017 09:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365772#M5425</guid>
      <dc:creator>quahfamili</dc:creator>
      <dc:date>2017-12-26T09:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using windows batch file to run search on CLI</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365773#M5426</link>
      <description>&lt;P&gt;Anyone have any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 07:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365773#M5426</guid>
      <dc:creator>quahfamili</dc:creator>
      <dc:date>2017-12-27T07:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using windows batch file to run search on CLI</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365774#M5427</link>
      <description>&lt;P&gt;Do you have anything in your batch file to login as a Splunk user before running this command?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 09:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365774#M5427</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-12-27T09:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using windows batch file to run search on CLI</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365775#M5428</link>
      <description>&lt;P&gt;Give this a try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;start "" CALL 'splunk.exe search "index=xx |eval xx| table xx xx xx" -output csv c:\test.csv'
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Dec 2017 16:20:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Using-windows-batch-file-to-run-search-on-CLI/m-p/365775#M5428</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-12-27T16:20:01Z</dc:date>
    </item>
  </channel>
</rss>

