From d595eb261404e378b10a1f520fc7e97050245436 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Thu, 18 Jun 2020 13:12:58 +0900 Subject: [PATCH] change exec node example to use echo command and merge two examples --- .../01 execute external command and get standard output.json | 2 +- .../03 execute external command appending additional args.json | 1 - ...mode.json => 03 execute external command in spawn mode.json} | 0 3 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command appending additional args.json rename packages/node_modules/@node-red/nodes/examples/function/exec/{04 execute external command in spawn mode.json => 03 execute external command in spawn mode.json} (100%) diff --git a/packages/node_modules/@node-red/nodes/examples/function/exec/01 execute external command and get standard output.json b/packages/node_modules/@node-red/nodes/examples/function/exec/01 execute external command and get standard output.json index c92cd79b3..365e4405c 100644 --- a/packages/node_modules/@node-red/nodes/examples/function/exec/01 execute external command and get standard output.json +++ b/packages/node_modules/@node-red/nodes/examples/function/exec/01 execute external command and get standard output.json @@ -1 +1 @@ -[{"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":[]}] \ No newline at end of file +[{"id":"6a5f26a9.0cc2d8","type":"inject","z":"835cc8cc.b8cca8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello World!","payloadType":"str","x":190,"y":160,"wires":[["fc2b343c.bbe2f8"]]},{"id":"fc2b343c.bbe2f8","type":"exec","z":"835cc8cc.b8cca8","command":"echo","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":330,"y":160,"wires":[["2f3bcd73.6fedf2"],[],["3280586e.4e3d28"]]},{"id":"2f3bcd73.6fedf2","type":"debug","z":"835cc8cc.b8cca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":160,"wires":[]},{"id":"2b7bc9f1.ab36a6","type":"comment","z":"835cc8cc.b8cca8","name":"Execute external command appending additional args","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\nIf `Append msg.payload` checkbox is selected, payload value of the input message is appended to command string.\n","x":260,"y":60,"wires":[]},{"id":"3280586e.4e3d28","type":"debug","z":"835cc8cc.b8cca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":220,"wires":[]},{"id":"feba83da.8f227","type":"comment","z":"835cc8cc.b8cca8","name":"↓ execute echo command","info":"","x":390,"y":115,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command appending additional args.json b/packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command appending additional args.json deleted file mode 100644 index 1b1febda8..000000000 --- a/packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command appending additional args.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":"6a5f26a9.0cc2d8","type":"inject","z":"835cc8cc.b8cca8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-l","payloadType":"str","x":170,"y":160,"wires":[["fc2b343c.bbe2f8"]]},{"id":"fc2b343c.bbe2f8","type":"exec","z":"835cc8cc.b8cca8","command":"/bin/ls","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":330,"y":160,"wires":[["2f3bcd73.6fedf2"],[],["3280586e.4e3d28"]]},{"id":"2f3bcd73.6fedf2","type":"debug","z":"835cc8cc.b8cca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":160,"wires":[]},{"id":"2b7bc9f1.ab36a6","type":"comment","z":"835cc8cc.b8cca8","name":"Execute external command appending additional args","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\nIf `Append msg.payload` checkbox is selected, payload value of the input message is appended to command string.\n\n*This example only works on UNIX flavored system.*","x":260,"y":60,"wires":[]},{"id":"3280586e.4e3d28","type":"debug","z":"835cc8cc.b8cca8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":220,"wires":[]},{"id":"feba83da.8f227","type":"comment","z":"835cc8cc.b8cca8","name":"↓ execute /bin/ls command with -l option","info":"","x":440,"y":115,"wires":[]}] \ No newline at end of file diff --git a/packages/node_modules/@node-red/nodes/examples/function/exec/04 execute external command in spawn mode.json b/packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command in spawn mode.json similarity index 100% rename from packages/node_modules/@node-red/nodes/examples/function/exec/04 execute external command in spawn mode.json rename to packages/node_modules/@node-red/nodes/examples/function/exec/03 execute external command in spawn mode.json