I have noticed before that EXEC node doesn't always behave in the same way as terminal. But this is a particular case
Trying to execute a simple command:
dig -f lista.txt @1.1.1.1 | grep -E '<<>>|status|time'
This command executes dig to a list of URLs contained in a file, and then filter results using grep
When using terminal window the comand works as expected:
; <<>> DiG 9.11.3-1ubuntu1.15-Ubuntu <<>> www.amazon.com
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1599
;; Query time: 37 msec
...
Now, when trying to execute the same command with EXEC node (using same PC):
; <<>> DiG 9.11.3-1ubuntu1.15-Ubuntu <<>> 1634871188880 -f lista_url.txt @1.1.1.1
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 45038
;; Query time: 36 msec
; <<>> DiG 9.11.3-1ubuntu1.15-Ubuntu <<>> www.amazon.com
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4334
;; Query time: 58 msec
...
in this case, dig first tries to use the arguments of the command line (and a number which I cannot identify the source) as if they were an URL, then execute the command as expected, reading the URLs from the specified file.
Currently using node-red v2.1.0 and Node.JS v14.18.1