Support Questions
Find answers, ask questions, and share your expertise

how to run simple linux commands in nifi without shell scripting, which processor use ????

how to run simple linux commands in nifi without shell scripting, which processor use ????

New Contributor
 
3 REPLIES 3

Re: how to run simple linux commands in nifi without shell scripting, which processor use ????

Super Mentor

Re: how to run simple linux commands in nifi without shell scripting, which processor use ????

New Contributor

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).

Re: how to run simple linux commands in nifi without shell scripting, which processor use ????

Super Guru

@Gopal Mehakare

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:-

62460-executestreamcommand.png

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:-

62461-executeprocess.png

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

https://stackoverflow.com/questions/42443101/nifi-how-to-reference-a-flowfile-in-executestreamcomman...