Created 02-20-2018 09:33 AM
Created 02-20-2018 09:59 AM
Use ExcecuteProcess Processor to execute shell script
Please see:
Created 02-21-2018 05:17 AM
I want to execute the simple linux command without shell script , is there any processor available in nifi.. where i can directly type linux command and get the output(execute processor is for shell script).
Created on 02-21-2018 05:52 AM - edited 08-17-2019 07:18 PM
you can use either of execute stream command processor which accepts incoming connections (or) Execute process which won't accept incoming connections based on your requirements to execute linux commands
Execute Stream Command configs:-
let's consider your input flowfile content is as follows
hi hcc nifi
output from Execute stream command processor would be just hi because we are executing bash command head -1 on the input flowfile content and output stream relation will transfer hi as new content of flowfile content.
Output:-
hi
Execute Process configs:-
The Success relation flowfile content will have just hi in it, as we are executing echo and this processor can run on own(no need of any incoming connections).
Output:-
hi
For More reference:-
https://community.hortonworks.com/questions/150122/zip-folder-using-nifi.html