<?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 Re: awk command in ExecuteStreamCommand in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/awk-command-in-ExecuteStreamCommand/m-p/242879#M204678</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/31160/agulshani.html"&gt;@Gulshan Agivetova&lt;/A&gt;&lt;/P&gt;&lt;P&gt;At least one problem i see in your config which is causing the following error:&lt;/P&gt;&lt;PRE&gt;Executable command awk ended in an error: awk: fatal: cannot open file `print $0}" for reading (No such file or directory&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thsis is because in your . "Command Arguments" you are using semicolon. And in "ExecuteStreamCommand" the "Argument Delimiter" is also set to ";"  (which is default delimiter)&lt;/P&gt;&lt;P&gt;May be you can try changing the "Argument Delimiter" to something else then check if you are still getting the same error or not?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 20:28:42 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2019-06-20T20:28:42Z</dc:date>
    <item>
      <title>awk command in ExecuteStreamCommand</title>
      <link>https://community.cloudera.com/t5/Support-Questions/awk-command-in-ExecuteStreamCommand/m-p/242878#M204677</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I need to execute following awk command on flow file via ExecuteStreamCommand processor&lt;/P&gt;&lt;P&gt;awk -F"," '{OFS=","; $4=substr($4,1,19); print $0}'&lt;/P&gt;&lt;P&gt;When run it throws an error: &lt;EM&gt;&lt;STRONG&gt;Executable command awk ended in an error: awk: fatal: cannot open file `print $0}" for reading (No such file or directory).&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Flow file comes from ListFTP -&amp;gt; FetchFTP -&amp;gt; ExecuteStreamCommand &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please help to solve this issue!!&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When running the same awk command on server it works fine:&lt;/P&gt;&lt;P&gt;awk -F"," '{OFS=","; $4=substr($4,1,19); print $0}' myfile.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/8005i355C8FF4A7C2894A/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="ecs.png" title="ecs.png" /&gt;</description>
      <pubDate>Thu, 20 Jun 2019 18:20:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/awk-command-in-ExecuteStreamCommand/m-p/242878#M204677</guid>
      <dc:creator>a_gulshani</dc:creator>
      <dc:date>2019-06-20T18:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: awk command in ExecuteStreamCommand</title>
      <link>https://community.cloudera.com/t5/Support-Questions/awk-command-in-ExecuteStreamCommand/m-p/242879#M204678</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/31160/agulshani.html"&gt;@Gulshan Agivetova&lt;/A&gt;&lt;/P&gt;&lt;P&gt;At least one problem i see in your config which is causing the following error:&lt;/P&gt;&lt;PRE&gt;Executable command awk ended in an error: awk: fatal: cannot open file `print $0}" for reading (No such file or directory&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thsis is because in your . "Command Arguments" you are using semicolon. And in "ExecuteStreamCommand" the "Argument Delimiter" is also set to ";"  (which is default delimiter)&lt;/P&gt;&lt;P&gt;May be you can try changing the "Argument Delimiter" to something else then check if you are still getting the same error or not?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 20:28:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/awk-command-in-ExecuteStreamCommand/m-p/242879#M204678</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2019-06-20T20:28:42Z</dc:date>
    </item>
  </channel>
</rss>

