Reputation: 490
I use NiFi on Windows 10 machine with installed Linux subsystem (Ubuntu).
My task is to execute bash scripts and commands using NiFi. I tried to use ExecuteProcess
and ExecuteStreamCommand
with selected commands like simply 'bash
' or 'bash ls
' for test purposes, but all I got was:
ExecuteProcess[id=4f530725-0171-1000-d1b1-7df587eada7e] /bin/ls: /bin/ls: cannot execute binary file
If I try to pass basic Windows commands everything is OK.
Is there a way to run bash commands in my case?
Upvotes: 1
Views: 4679
Reputation: 12093
I'm not a Windows user but according to the docs, in order to get to the Linux-style commands you have to run Bash.exe
, so I'm guessing you'll need to specify -c
as an argument followed by the Linux bash command you want to run (as a string), something like:
bash -c "ls"
Upvotes: 3