Thanks so much.
I managed to use "toCharArray()" method and documented here: http://www.costaricamakers.com/?p=190
I realize though your method is a lot more straight forward, so I'll update my post soon :-)
Do you know if system calls work with shell scripts?
e.g I can do system("curl https://myurl.com") but if i write a shell script containing the same command and call it with system("/home/root/myscript.sh") it just doesn't work!! (I'm sure the script is OK because I can run from linux command line)