<?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>question NiFi ExecuteCommandStream with sed in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/294454#M217268</link>
    <description>&lt;P&gt;I'm trying to run a sed command through a&amp;nbsp;ExecuteCommandStream but I get the error pasted below. The&amp;nbsp;ExecuteCommandStream has the input from a EvaluateXPath processor. How do I give the flowfile argument? I'm getting this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExecuteStreamCommand[id=9c7cfd48-0171-1000-1a59-064ce951124a] Transferring flow file StandardFlowFileRecord[uuid=e448ca5a-8dc8-4754-a0d4-549db92d1f79,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1587501858734-9104, container=default, section=912], offset=375435, length=-1],offset=0,name=DL_prelchim1971_20190302_142639_20190302_145642.xml,size=0] to nonzero status. Executable command sed ended in an error: Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file].&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sedp.jpg" style="width: 794px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/27204i0BD5FADA02E02160/image-size/large?v=v2&amp;amp;px=999" role="button" title="sedp.jpg" alt="sedp.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 20:50:38 GMT</pubDate>
    <dc:creator>Miluta</dc:creator>
    <dc:date>2020-04-21T20:50:38Z</dc:date>
    <item>
      <title>NiFi ExecuteCommandStream with sed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/294454#M217268</link>
      <description>&lt;P&gt;I'm trying to run a sed command through a&amp;nbsp;ExecuteCommandStream but I get the error pasted below. The&amp;nbsp;ExecuteCommandStream has the input from a EvaluateXPath processor. How do I give the flowfile argument? I'm getting this error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ExecuteStreamCommand[id=9c7cfd48-0171-1000-1a59-064ce951124a] Transferring flow file StandardFlowFileRecord[uuid=e448ca5a-8dc8-4754-a0d4-549db92d1f79,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1587501858734-9104, container=default, section=912], offset=375435, length=-1],offset=0,name=DL_prelchim1971_20190302_142639_20190302_145642.xml,size=0] to nonzero status. Executable command sed ended in an error: Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file].&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sedp.jpg" style="width: 794px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/27204i0BD5FADA02E02160/image-size/large?v=v2&amp;amp;px=999" role="button" title="sedp.jpg" alt="sedp.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 20:50:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/294454#M217268</guid>
      <dc:creator>Miluta</dc:creator>
      <dc:date>2020-04-21T20:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi ExecuteCommandStream with sed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/294784#M217430</link>
      <description>&lt;P&gt;You have to provide full path of your script in "Command Path" Attribute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;All the flowfile arguments can be passed in "Command Arguments" Property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In below example, I am considering that I have a shell script created under /tmp directory with the name yourscript.sh&lt;/P&gt;&lt;P&gt;This script should have all the logics inside to handle receiving arguments and other logics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vj1989_0-1587904660363.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/27242i45A112B4169928AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vj1989_0-1587904660363.png" alt="Vj1989_0-1587904660363.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Script Content (/tmp/yourscript.sh)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;echo $1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected Output: Just print the name of the FlowFile inside the flow file content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may check this video for complete detail:&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=rUJOS6LT5Jk&amp;amp;t=27s" target="_blank"&gt;https://www.youtube.com/watch?v=rUJOS6LT5Jk&amp;amp;t=27s&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 12:43:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/294784#M217430</guid>
      <dc:creator>Vj1989</dc:creator>
      <dc:date>2020-04-26T12:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi ExecuteCommandStream with sed</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/295048#M217561</link>
      <description>&lt;P&gt;I've already checked this material before, thank you!&lt;/P&gt;&lt;P&gt;I didn't manage to fully apply it to my case. I have xml input flowfiles and need to do some text replace and after that push them foward in the flow.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2020 07:54:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-ExecuteCommandStream-with-sed/m-p/295048#M217561</guid>
      <dc:creator>Miluta</dc:creator>
      <dc:date>2020-04-29T07:54:12Z</dc:date>
    </item>
  </channel>
</rss>

