nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Burgess <>
Subject Re: Escape * and new line character
Date Tue, 21 Jun 2016 13:43:29 GMT

I agree with Bryan that other processors may be better here. You could
use ListFile -> FetchFile, or as Bryan said, you could use GetFile.


On Tue, Jun 21, 2016 at 9:38 AM, Bryan Rosander <> wrote:
> Hi Huagen,
> 1. The ExecuteStreamCommand uses a ProcessBuilder under the covers.  If you
> want wildcard expansion, you should avoid quoting the arg to be expanded.
> Alternatively, you could run bash as your command with -c as the first
> argument and then the original command as a single argument to bash.
> (
> That being said, it might be better to use NiFi's GetFiles functionality to
> get the contents of each file in a given directory as a FlowFile.
> 2. If you need to ender a newline into a text field, I believe you can do so
> with Shift+Enter (see
> and search for carriage return)
> Thanks,
> Bryan
> On Tue, Jun 21, 2016 at 9:12 AM, Huagen peng <> wrote:
>> Hi,
>> I need help on escaping characters in a couple of situations:
>> 1. I use the ExecuteStreamCommand to output the content of all the *.txt
>> files in a directory.  I would like to use the cat command and I found
>> myself not able to escape the *.txt in the argument.  For now I end up
>> calling a shell script with basically ‘cat *.txt’ in the script.  Is there a
>> simpler way to do this?
>> 2. Before I send email using PutEmail, I have an UpdateAttribute processor
>> to compose the email message.  How do I escape the new line character in the
>> attribute so that I can have a multiline email message?
>> Thanks,
>> Huagen

View raw message