<?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 Search result value as an argument to perl script in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59340#M14602</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am invoking perl script with script command in search, which needs to take search result field as an argument to the script.&lt;BR /&gt;
|inputcsv model.txt|table str&lt;BR /&gt;
this is giving &lt;BR /&gt;
name=ABC,input=5,output=6&lt;BR /&gt;
I need to pass this value as string parameter to script as&lt;BR /&gt;
script perl tcpclient name=ABC,input=5,output=6&lt;/P&gt;

&lt;P&gt;so i am executing &lt;BR /&gt;
|inputcsv model.txt|table str|script perl tcpclient str&lt;/P&gt;

&lt;P&gt;but I am getting as "str" not the value.&lt;BR /&gt;
if i hard code it like&lt;BR /&gt;
|inputcsv model.txt|table str|script perl tcpclient name=ABC,input=5,output=6&lt;BR /&gt;
I am getting it properly.&lt;BR /&gt;
Can you please help me how I can use the value of "str" other than "str" as I cannot hardcode it. I need to read csv and need to pass the value of str as an argument to perl script.&lt;BR /&gt;
Please suggest. This is very urgent.:(&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Disha&lt;/P&gt;</description>
    <pubDate>Tue, 12 Mar 2013 23:49:10 GMT</pubDate>
    <dc:creator>disha</dc:creator>
    <dc:date>2013-03-12T23:49:10Z</dc:date>
    <item>
      <title>Search result value as an argument to perl script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59340#M14602</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I am invoking perl script with script command in search, which needs to take search result field as an argument to the script.&lt;BR /&gt;
|inputcsv model.txt|table str&lt;BR /&gt;
this is giving &lt;BR /&gt;
name=ABC,input=5,output=6&lt;BR /&gt;
I need to pass this value as string parameter to script as&lt;BR /&gt;
script perl tcpclient name=ABC,input=5,output=6&lt;/P&gt;

&lt;P&gt;so i am executing &lt;BR /&gt;
|inputcsv model.txt|table str|script perl tcpclient str&lt;/P&gt;

&lt;P&gt;but I am getting as "str" not the value.&lt;BR /&gt;
if i hard code it like&lt;BR /&gt;
|inputcsv model.txt|table str|script perl tcpclient name=ABC,input=5,output=6&lt;BR /&gt;
I am getting it properly.&lt;BR /&gt;
Can you please help me how I can use the value of "str" other than "str" as I cannot hardcode it. I need to read csv and need to pass the value of str as an argument to perl script.&lt;BR /&gt;
Please suggest. This is very urgent.:(&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Disha&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2013 23:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59340#M14602</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2013-03-12T23:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search result value as an argument to perl script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59341#M14603</link>
      <description>&lt;P&gt;Hi disha, probably a silly question, but have you tried to separate each of the fields instead of including them in one string, eg; instead of str, have the fields name, input, output...just a suggestion&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2013 05:48:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59341#M14603</guid>
      <dc:creator>vincesesto</dc:creator>
      <dc:date>2013-03-13T05:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Search result value as an argument to perl script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59342#M14604</link>
      <description>&lt;P&gt;Yes Vincesesto,&lt;BR /&gt;
I have tried just "name" also inplace of str and also try the python script instead of Perl.Till now it seems like script can only invoke the perl/python script with hardcoded input arguments. Please suggest.&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Disha&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2013 06:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59342#M14604</guid>
      <dc:creator>disha</dc:creator>
      <dc:date>2013-03-13T06:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Search result value as an argument to perl script</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59343#M14605</link>
      <description>&lt;P&gt;You could register your python script as a custom command, and use splunk.Intersplunk to retrieve search results.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2013 09:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-result-value-as-an-argument-to-perl-script/m-p/59343#M14605</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-03-13T09:42:08Z</dc:date>
    </item>
  </channel>
</rss>

