[
https://issues.apache.org/jira/browse/NIFI-3221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16798741#comment-16798741
]
Suman B N edited comment on NIFI-3221 at 3/23/19 7:41 AM:
----------------------------------------------------------
Is this getting fixed? We are also facing the same issue.
Trying to use _sed_ command to replace the contents of the file but its failing
to add double quotes..
Replace below 2 strings with 2 different strings:
* _<row>_ with _<row json:force-array="true">_
* _<data_ with _<data xmlns:json="http://json.org/"_
{noformat}
sed -e 's/<row>/<row json:force-array="true">/; s/<data/<data
xmlns:json="http:\/\/json.org\/"/' input.xml
{noformat}
Output:
{noformat}
<row json:force-array=true>
<data xmlns:json=http://json.org/
{noformat}
Above seem to work as Linux or mac command but fails when used in NiFi.
Regards,
Suman
was (Author: sumannewton):
Is this getting fixed? We are also facing the same issue.
Trying to use _sed_ command to replace the contents of the file but its failing
to add double quotes..
Replace below 2 strings with 2 different strings:
* _<row>_ with _<row json:force-array="true">_
* _<data_ with _<data xmlns:json="http://json.org/"_
{noformat}
sed -e 's/<row>/<row json:force-array="true">/; s/<data/<data
xmlns:json="http:\/\/json.org\/"/' input.xml
{noformat}
Above seem to work as Linux or mac command but fails when used in NiFi.
Regards,
Suman
> ExecuteStreamCommand filters out any double quotes when parsing the "Command
> Arguments"
> ---------------------------------------------------------------------------------------
>
> Key: NIFI-3221
> URL: https://issues.apache.org/jira/browse/NIFI-3221
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Joseph Percivall
> Priority: Major
>
> Brought up on the mailing list[1], the ExecuteStreamCommand attempts to
> intelligently parse the "Command Arguments" by automatically detecting double
> quotes (") and treating those within double quotes as a single argument[2].
> This is a nice feature but has the unfortunate side-effect of filtering out
> all double quotes.
> It should instead take into account when the double quote is escaped: \"
> [1] http://mail-archives.apache.org/mod_mbox/nifi-users/201612.mbox/browser
> [2]
> https://github.com/apache/nifi/blob/e12e7a55b75f5e358bdbcea79be9baba77532f94/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/ArgumentUtils.java#L60-L60
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)