<?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 assign a Splunk status result to a variable in a script? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201641#M39926</link>
    <description>&lt;P&gt;Thanks for your reply. it is working&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2016 18:36:09 GMT</pubDate>
    <dc:creator>saifuddin9122</dc:creator>
    <dc:date>2016-08-01T18:36:09Z</dc:date>
    <item>
      <title>How to assign a Splunk status result to a variable in a script?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201639#M39924</link>
      <description>&lt;P&gt;hello &lt;/P&gt;

&lt;P&gt;I am working on a script for running Splunk.&lt;/P&gt;

&lt;P&gt;I want to check status of Splunk and assign the result of the status to a variable for further use.&lt;BR /&gt;
Can any one please help me with this?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 17:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201639#M39924</guid>
      <dc:creator>saifuddin9122</dc:creator>
      <dc:date>2016-08-01T17:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a Splunk status result to a variable in a script?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201640#M39925</link>
      <description>&lt;P&gt;You can run following command and capture the output in a variable.&lt;BR /&gt;
Shell script example &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;status=$($SPLUNK_HOME/bin/splunk status | grep not | wc -l )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If status=0, Splunk is up, down otherwise (1). Replace $SPLUNK_HOME with your installation path.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 18:17:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201640#M39925</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-01T18:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a Splunk status result to a variable in a script?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201641#M39926</link>
      <description>&lt;P&gt;Thanks for your reply. it is working&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 18:36:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-assign-a-Splunk-status-result-to-a-variable-in-a-script/m-p/201641#M39926</guid>
      <dc:creator>saifuddin9122</dc:creator>
      <dc:date>2016-08-01T18:36:09Z</dc:date>
    </item>
  </channel>
</rss>

