Hi
I was playing around with the File Write Script example from the bridge. http://arduino.cc/en/Tutorial/FileWriteScript
I changed the line
void runScript() {
// Run the script and show results on the Serial
Process myscript;
myscript.begin("/tmp/wlan-stats.sh");
myscript.run();
to
void runScript() {
// Run the script and show results on the Serial
Process myscript;
myscript.begin("ls /tmp");
myscript.run();
And that didn't work.
After reading up I learned about runShellCommand so I tried
void runScript() {
// Run the script and show results on the Serial
Process myscript;
//myscript.begin("/tmp/wlan-stats.sh");
myscript.runShellCommand("/tmp/wlan-stats.sh");
//myscript.run();
Which also works with ls /tmp :D.
The documentation of run nor runShellCommand explains me this behaviour.
Can someone explain this behaviour and tell me why I would want to use plain run?
Best regards
Jantje