<?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: CLI Search Command: Why does search that includes a field name fail? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498582#M138920</link>
    <description>&lt;P&gt;Sorry, my mistake. Windows is special, I assumes Linux/Mac and only tested on those.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 09:53:37 GMT</pubDate>
    <dc:creator>ololdach</dc:creator>
    <dc:date>2019-10-09T09:53:37Z</dc:date>
    <item>
      <title>CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498577#M138915</link>
      <description>&lt;P&gt;This cli  &lt;CODE&gt;search&lt;/CODE&gt; command works from a machine with a universal forwarder:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;splunk search "index="foo" earliest=-7d | sort -SensorDateTime | stats first(SensorDateTime) by bar" -preview false -uri &lt;A href="https://indexer:8089" target="test_blank"&gt;https://indexer:8089&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Output in cmd window:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;INFO: Your timerange was substituted based on your search string

bar        first(SensorDateTime)
---------- ------------------------------------
C:\x\A.txt 10/2/2019 9:59:11 PM
C:\x\B.txt 10/2/2019 9:59:11 PM
C:\x\C.txt 10/2/2019 9:59:11 PM
C:\x\D.txt 10/2/2019 9:59:11 PM
C:\x\E.txt 10/2/2019 9:59:11 PM
C:\x\F.txt 10/2/2019 9:59:11 PM
C:\x\G.txt 10/2/2019 9:59:11 PM
C:\x\H.txt 10/2/2019 9:59:11 PM
C:\x\I.txt 10/2/2019 9:59:11 PM
C:\x\J.txt 10/2/2019 9:59:11 PM
C:\y\A.txt 9/30/2019 9:53:20 PM
C:\y\B.txt 9/30/2019 9:53:20 PM
C:\y\C.txt 9/30/2019 9:53:20 PM
C:\y\D.txt 9/30/2019 9:53:20 PM
C:\y\E.txt 9/30/2019 9:53:20 PM
C:\y\F.txt 9/30/2019 9:53:20 PM
C:\y\G.txt 9/30/2019 9:53:20 PM
C:\y\H.txt 9/30/2019 9:53:20 PM
C:\y\I.txt 9/30/2019 9:53:20 PM
C:\y\J.txt 9/30/2019 9:53:20 PM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, when I do this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;splunk search "index="foo" bar="C:\x\A.txt" earliest=-7d | sort -SensorDateTime | stats first(SensorDateTime) by bar" -preview false -uri &lt;A href="https://indexer:8089" target="test_blank"&gt;https://indexer:8089&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;splunk search "index="foo" bar="C:\\x\\A.txt" earliest=-7d | sort -SensorDateTime | stats first(SensorDateTime) by bar" -preview false -uri &lt;A href="https://indexer:8089" target="test_blank"&gt;https://indexer:8089&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I get nothing back. I expect to get back one event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; bar        first(SensorDateTime)
 ---------- -------------------------------------
 C:\x\A.txt 10/2/2019 9:59:11 PM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why can't I include &lt;CODE&gt;bar="C:\x\A.txt"&lt;/CODE&gt; in my search and get results?&lt;/P&gt;

&lt;P&gt;p.s. This search works fine when I execute it from the indexer or search head web page:&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 15:09:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498577#M138915</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-10-07T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498578#M138916</link>
      <description>&lt;P&gt;Try &lt;STRONG&gt;single&lt;/STRONG&gt; quotes around your search: &lt;CODE&gt;splunk search 'index="foo" bar="C:\x\A.txt" earliest=-7d | sort -SensorDateTime | stats first(SensorDateTime) by bar' -preview false -uri &lt;A href="https://indexer:8089" target="test_blank"&gt;https://indexer:8089&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 16:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498578#M138916</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-10-07T16:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498579#M138917</link>
      <description>&lt;P&gt;tried it - batch file crashed:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;'stats' is not recognized as an internal or external command, operable program or batch file.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I'm pretty sure apostrophes (single quotes) are ignored by cmd.exe&lt;/P&gt;

&lt;P&gt;Can't find a Microsoft source, but:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/24173825/what-does-single-quote-do-in-windows-batch-files"&gt;What does single quote do in windows batch files?&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/24173825/what-does-single-quote-do-in-windows-batch-files"&gt;https://stackoverflow.com/questions/24173825/what-does-single-quote-do-in-windows-batch-files&lt;/A&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Single quotes are not used at all by&lt;BR /&gt;
the cmd.exe command processor except&lt;BR /&gt;
to enclose the command to run within a&lt;BR /&gt;
FOR /F statement:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 07 Oct 2019 17:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498579#M138917</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-10-07T17:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498580#M138918</link>
      <description>&lt;P&gt;FYI - ignore this question - I decide to use the REST api instead since the cli seems so ........ buggy&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 17:34:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498580#M138918</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-10-07T17:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498581#M138919</link>
      <description>&lt;P&gt;FYI - ignore this question - I decide to use the REST api instead since the cli seems so ........ buggy&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 17:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498581#M138919</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-10-07T17:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498582#M138920</link>
      <description>&lt;P&gt;Sorry, my mistake. Windows is special, I assumes Linux/Mac and only tested on those.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 09:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498582#M138920</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2019-10-09T09:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: CLI Search Command: Why does search that includes a field name fail?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498583#M138921</link>
      <description>&lt;P&gt;FYI - ignore this question - I decide to use the REST api instead since the cli seems so ........ buggy&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 16:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CLI-Search-Command-Why-does-search-that-includes-a-field-name/m-p/498583#M138921</guid>
      <dc:creator>williamcharlton</dc:creator>
      <dc:date>2019-10-25T16:45:47Z</dc:date>
    </item>
  </channel>
</rss>

