Huagen, I agree with Bryan that other processors may be better here. You could use ListFile -> FetchFile, or as Bryan said, you could use GetFile.
Regards, Matt On Tue, Jun 21, 2016 at 9:38 AM, Bryan Rosander <bryanrosan...@gmail.com> 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. > (http://stackoverflow.com/questions/16403539/cant-run-program-with-processbuilder-runs-fine-from-command-line#answer-16403599). > > 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 > https://pierrevillard.com/2016/04/04/analyze-flickr-account-using-apache/ > and search for carriage return) > > Thanks, > Bryan > > On Tue, Jun 21, 2016 at 9:12 AM, Huagen peng <huagen.p...@gmail.com> 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 > >