This is the node:
--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
#! /bin/bash
declare -a Unix=('Debian' 'Red hat' 'Red hat' 'Suse' 'Fedora');[{"id":"66ced73a.993128","type":"inject","z":"ec4d1ad9.13b2e8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":103.5,"y":533,"wires":[["7c57572c.83a8a8"]]},{"id":"7c57572c.83a8a8","type":"exec","z":"ec4d1ad9.13b2e8","command":"/home/pi/testshellscript.sh","addpay":false,"append":"","useSpawn":"","name":"","x":285.5,"y":577.5,"wires":[["78a0c3e1.875f3c"],["78a0c3e1.875f3c"],["78a0c3e1.875f3c"]]},{"id":"78a0c3e1.875f3c","type":"debug","z":"ec4d1ad9.13b2e8","name":"","active":true,"console":"false","complete":"false","x":381.5,"y":702,"wires":[]}]
where testshellscript.sh is
#! /bin/bash
declare -a Unix=('Debian' 'Red hat' 'Red hat' 'Suse' 'Fedora');
echo Unix
and the permissions are set to make it an executable
I get the result I would expect I'm running
Node-RED version: v0.13.2
Node.js version: v4.3.1
It tooks some time but I did a test :)
I'm running:
Node-RED version: v0.13.4
Node.js version: v0.10.29
Linux 4.1.17+ arm LE
Using your flow and your shell script I get always the same error: /home/pi/testshellscript.sh: 3: /home/pi/testshellscript.sh: Syntax error: "(" unexpected
I tried to upgrade node.js to latest stable and now I have:
Node-RED version: v0.13.4
Node.js version: v6.2.1
Linux 4.1.17+ arm LE
But unfortunately same result :(
echo ${Unix[@]}

this is odd - using that simple script seems to work fine for me... (on Mac)
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
I guess there are "other" shells available also... sh, ksh, dash etc ...
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.


Or add in node-red-node-geofence to the flow before sending to map 😀
var p = context.global.stations;
if (p.hasOwnProperty(msg.payload.idImpianto)) { var s = p[msg.payload.idImpianto]; var t = msg.payload.descCarburante; s[t] = {prezzo:msg.payload.prezzo, isSelf:msg.payload.isSelf, dtComu:msg.payload.dtComu}; context.global.stations[msg.payload.idImpianto] = s;}else { //console.log(msg.payload.idImpianto);}return {payload:1};