<?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: --data-urlencode doesn't work on linux. Is there an alternative? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128369#M4875</link>
    <description>&lt;P&gt;Good question Sean. I should have mentioned in my post. The version is definitely the issue. My Cygwin instance is using 7.39.xx while my linux boxes have 7.15.xx. Unfortunately, I'm a non-root user so upgrading curl isn't an option. &lt;/P&gt;</description>
    <pubDate>Thu, 20 Nov 2014 20:56:14 GMT</pubDate>
    <dc:creator>shantu</dc:creator>
    <dc:date>2014-11-20T20:56:14Z</dc:date>
    <item>
      <title>--data-urlencode doesn't work on linux. Is there an alternative?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128367#M4873</link>
      <description>&lt;P&gt;I'm using curl to export some csv data from Splunk using the REST API. The curl command is below:&lt;/P&gt;

&lt;P&gt;curl --get -s -u admin:pwd -k https:localhost:8088/servicesNS/admin/search/search/jobs/export -d output_mode=csv --data-urlencode search="search index=* sourcetype="log4j" | rex field=_raw ".&lt;EM&gt;ERROR\s+(?.&lt;/EM&gt;)\n | top limit=20 ErrorMessage" -o aggregatedErrors.csv&lt;/P&gt;

&lt;P&gt;It works fine on cygwin, but my linux boxes say "curl: option --data-urlencode: is unknown" (because in fact, it isn't an option when I look under curl --help). What's the alternative? Is there a way to encode this on linux/mac terminals as well?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:13:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128367#M4873</guid>
      <dc:creator>shantu</dc:creator>
      <dc:date>2020-09-28T18:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: --data-urlencode doesn't work on linux. Is there an alternative?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128368#M4874</link>
      <description>&lt;P&gt;What version of curl are you running?  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl --version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;--data-urlencode was added around v 7.18.0 before 2010 I believe. If you have a previous version, is upgrading curl an option?&lt;/P&gt;

&lt;P&gt;-Sean&lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2014 20:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128368#M4874</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2014-11-20T20:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: --data-urlencode doesn't work on linux. Is there an alternative?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128369#M4875</link>
      <description>&lt;P&gt;Good question Sean. I should have mentioned in my post. The version is definitely the issue. My Cygwin instance is using 7.39.xx while my linux boxes have 7.15.xx. Unfortunately, I'm a non-root user so upgrading curl isn't an option. &lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2014 20:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128369#M4875</guid>
      <dc:creator>shantu</dc:creator>
      <dc:date>2014-11-20T20:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: --data-urlencode doesn't work on linux. Is there an alternative?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128370#M4876</link>
      <description>&lt;P&gt;Hmm, in that case you may want to look at doing it with perl. Hopefully URI::escape is installed. There are several ideas in this thread:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script"&gt;http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Nov 2014 21:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/data-urlencode-doesn-t-work-on-linux-Is-there-an-alternative/m-p/128370#M4876</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2014-11-20T21:09:37Z</dc:date>
    </item>
  </channel>
</rss>

