<?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 Scripted Input - Script calling another script in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197847#M7413</link>
    <description>&lt;P&gt;I have a scripted input, top20.sh, calling another script - top.sh.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/top20.sh]
interval = 60
sourcetype = top
source = top
index = linux
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;top20.sh:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
./bin/top.sh | head -n 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not getting data. Running top.sh works fine. Am I assuming the correct relative path? Any other reasons why this is not returning data?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Aug 2014 14:57:13 GMT</pubDate>
    <dc:creator>jamesvz84</dc:creator>
    <dc:date>2014-08-28T14:57:13Z</dc:date>
    <item>
      <title>Scripted Input - Script calling another script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197847#M7413</link>
      <description>&lt;P&gt;I have a scripted input, top20.sh, calling another script - top.sh.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/top20.sh]
interval = 60
sourcetype = top
source = top
index = linux
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;top20.sh:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
./bin/top.sh | head -n 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not getting data. Running top.sh works fine. Am I assuming the correct relative path? Any other reasons why this is not returning data?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 14:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197847#M7413</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-08-28T14:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Script calling another script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197848#M7414</link>
      <description>&lt;P&gt;No, the script will actually be run with the filesystem root (&lt;CODE&gt;/&lt;/CODE&gt;) as its working directory, so you'd have to provide the full path to your other script in order to execute it successfully.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2014 18:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197848#M7414</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-08-28T18:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Scripted Input - Script calling another script</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197849#M7415</link>
      <description>&lt;P&gt;The following worked on top20.sh. Not 100% sure, but I believe the modification gets the path of the calling script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
`dirname $0`/top.sh | head -n 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Sep 2014 14:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Scripted-Input-Script-calling-another-script/m-p/197849#M7415</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2014-09-02T14:36:49Z</dc:date>
    </item>
  </channel>
</rss>

