<?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 pass parameters in custom search command? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342353#M5305</link>
    <description>&lt;P&gt;Can you try to pass argument in double quotes ""? &lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 04:34:11 GMT</pubDate>
    <dc:creator>p_gurav</dc:creator>
    <dc:date>2018-04-20T04:34:11Z</dc:date>
    <item>
      <title>How to pass parameters in custom search command?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342352#M5304</link>
      <description>&lt;P&gt;I am trying out custom search command.&lt;BR /&gt;
I have in commands.conf the below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[createrecord1]
chunked = true
filename = myjava.path
command.arg.1 = -jar
command.arg.2 = splunkcreaterecord1.jar
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to know how to pass argument values from search&lt;BR /&gt;
 eg if I type  &lt;CODE&gt;|createrecord1 **100**&lt;/CODE&gt;&lt;BR /&gt;
it execute &lt;CODE&gt;" java  -jar  splunkcreaterecord.jar"&lt;/CODE&gt; without the parameter &lt;/P&gt;

&lt;P&gt;I would like the jar file to be executed as  &lt;CODE&gt;java  -jar  splunkcreaterecord.jar **100**&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Kindly assist&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 13:25:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342352#M5304</guid>
      <dc:creator>rajacybermak</dc:creator>
      <dc:date>2018-04-19T13:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass parameters in custom search command?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342353#M5305</link>
      <description>&lt;P&gt;Can you try to pass argument in double quotes ""? &lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 04:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342353#M5305</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-04-20T04:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass parameters in custom search command?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342354#M5306</link>
      <description>&lt;P&gt;Thanks Gaurav for the reply.&lt;BR /&gt;
Could you kindly elaborate&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 05:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342354#M5306</guid>
      <dc:creator>rajacybermak</dc:creator>
      <dc:date>2018-04-21T05:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass parameters in custom search command?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342355#M5307</link>
      <description>&lt;P&gt;Define it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [createrecord1]
 chunked = true
 filename = myjava.path
 command.arg.1 = jar
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then use it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | createrecord1 jar "splunkcreaterecord1.jar"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Apr 2018 21:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-pass-parameters-in-custom-search-command/m-p/342355#M5307</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-04-22T21:46:59Z</dc:date>
    </item>
  </channel>
</rss>

