<?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: Curl command error - b&amp;quot;/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh: in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521007#M146775</link>
    <description>&lt;P&gt;still getting the same error :&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh: -c: line 1: `]* (?P&amp;lt;host&amp;gt;[^ ]+)\\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ '\n"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2020 09:59:23 GMT</pubDate>
    <dc:creator>kumarviv</dc:creator>
    <dc:date>2020-09-23T09:59:23Z</dc:date>
    <item>
      <title>Curl command error - b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521002#M146770</link>
      <description>&lt;P&gt;When im trying to pull data using Curl on my mac for command :&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;' curl -s -ku admin:admin -o ?Users/Vivek/Desktop/09012020.csv https://localhost:8089/servicesNS/admin/search/search/jobs/export -d search=\"search index=network host=SGC01* OR host=APR01* earliest=09/01/2020:00:00:00 latest=09/01/2020:23:59:59 | rex field=_raw "^[^ \n]* (?P&amp;lt;host&amp;gt;[^ ]+)\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ \n]* \[(?P&amp;lt;fault_code&amp;gt;[^\]]+)[^\[\n]*\[(?P&amp;lt;state&amp;gt;[^\]]+)\]\[(?P&amp;lt;severity&amp;gt;[a-z]+)\]\[(?P&amp;lt;dn_mo&amp;gt;.*)\]" | stats count by host mnemonic fault_code state severity dn_mo\" -d output_mode=csv --data-urlencode -d preview="False" ' &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm getting an error with rex segment saying&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh: -c: line 1: `]* (?P&amp;lt;host&amp;gt;[^ ]+)\\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ '\n"&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Need help to solve this problem as the customer has to pull ~10M records summary stats by various cateogries&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/59"&gt;@Ayn&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/96090"&gt;@micahkemp&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163905"&gt;@harsmarvania57&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 09:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521002#M146770</guid>
      <dc:creator>kumarviv</dc:creator>
      <dc:date>2020-09-23T09:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Curl command error - b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521006#M146774</link>
      <description>&lt;P&gt;It looks like you are escape the wrong double quotes - try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;' curl -s -ku admin:admin -o ?Users/Vivek/Desktop/09012020.csv https://localhost:8089/servicesNS/admin/search/search/jobs/export -d search="search index=network host=SGC01* OR host=APR01* earliest=09/01/2020:00:00:00 latest=09/01/2020:23:59:59 | rex field=_raw \"^[^ \n]* (?P&amp;lt;host&amp;gt;[^ ]+)\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ \n]* \[(?P&amp;lt;fault_code&amp;gt;[^\]]+)[^\[\n]*\[(?P&amp;lt;state&amp;gt;[^\]]+)\]\[(?P&amp;lt;severity&amp;gt;[a-z]+)\]\[(?P&amp;lt;dn_mo&amp;gt;.*)\]\" | stats count by host mnemonic fault_code state severity dn_mo" -d output_mode=csv --data-urlencode -d preview="False" '&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Sep 2020 09:50:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521006#M146774</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-23T09:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Curl command error - b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521007#M146775</link>
      <description>&lt;P&gt;still getting the same error :&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh: -c: line 1: `]* (?P&amp;lt;host&amp;gt;[^ ]+)\\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ '\n"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 09:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521007#M146775</guid>
      <dc:creator>kumarviv</dc:creator>
      <dc:date>2020-09-23T09:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Curl command error - b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521010#M146776</link>
      <description>&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 10:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521010#M146776</guid>
      <dc:creator>kumarviv</dc:creator>
      <dc:date>2020-09-23T10:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Curl command error - b"/bin/sh: -c: line 1: syntax error near unexpected token `?P'\n/bin/sh:</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521020#M146782</link>
      <description>&lt;P&gt;Please check carefully - for example you had "...&amp;nbsp;-d search=\"search ..." whereas I had "... -d search="search ...". Having said that, perhaps you also need to escape the backslashes in the string&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;' curl -s -ku admin:admin -o ?Users/Vivek/Desktop/09012020.csv https://localhost:8089/servicesNS/admin/search/search/jobs/export -d search="search index=network host=SGC01* OR host=APR01* earliest=09/01/2020:00:00:00 latest=09/01/2020:23:59:59 | rex field=_raw \"^[^ \\n]* (?P&amp;lt;host&amp;gt;[^ ]+)\\s+%(?P&amp;lt;mnemonic&amp;gt;[^ ]+)[^ \\n]* \\[(?P&amp;lt;fault_code&amp;gt;[^\\]]+)[^\\[\\n]*\\[(?P&amp;lt;state&amp;gt;[^\\]]+)\\]\\[(?P&amp;lt;severity&amp;gt;[a-z]+)\\]\\[(?P&amp;lt;dn_mo&amp;gt;.*)\\]\" | stats count by host mnemonic fault_code state severity dn_mo" -d output_mode=csv --data-urlencode -d preview="False" '&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 10:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Curl-command-error-b-quot-bin-sh-c-line-1-syntax-error-near/m-p/521020#M146782</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-23T10:42:16Z</dc:date>
    </item>
  </channel>
</rss>

