1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red/nodes/examples/function/exec/01 execute external command and get standard output.json
2020-06-01 14:44:18 +09:00

1 line
1.5 KiB
JSON

[{"id":"e4d1d8.5684ee28","type":"inject","z":"f80cbd00.113d9","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":140,"wires":[["5f2fc1dc.04531"]]},{"id":"5f2fc1dc.04531","type":"exec","z":"f80cbd00.113d9","command":"/bin/ls","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":330,"y":140,"wires":[["a8226872.6072c8"],[],["2c84b8b0.f22a18"]]},{"id":"5f934490.218b5c","type":"comment","z":"f80cbd00.113d9","name":"Execute external command and get standard output","info":"Exec node can execute external command and can receive its standard output as a payload of first message. Standard error output can be received from second message. The exit code of the command can be obtained from `code` property of third message payload.\n\n*This example only works on UNIX flavored system.*","x":250,"y":40,"wires":[]},{"id":"2c84b8b0.f22a18","type":"debug","z":"f80cbd00.113d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":200,"wires":[]},{"id":"a8226872.6072c8","type":"debug","z":"f80cbd00.113d9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":140,"wires":[]},{"id":"7e482077.285aa","type":"comment","z":"f80cbd00.113d9","name":"↓ execute /bin/ls command","info":"","x":390,"y":91,"wires":[]}]