Quote:
Originally Posted by twobob
erm. I guess. if you prefixed it with /bin/sh or something.
I suppose I should try.
should I even ask why?
|
The "action" : "whatever"
is opening a shell with the argument of "whatever".
So a button action of a quoted shell command, like:
{"name": "Ash Command", "priority" : 1, "action": "set > /var/tmp/set.txt"}
Does what one would expect.
The "action" field also accepts multiple shell commands with the ';' statement separator.
(PS: the above is not a good scripting example, it writes directly to flash, one line at a time.)
And a button that does not re-direct its output anywhere, like:
{"name": "Ash Command", "priority" : 1, "action": "set"}
Writes its output to stdout, on which nothing is listening (as expected).
@dsmid : which means that none of your script outputs will ever be seen by anything other than the bit-bucket.
Check out my DateTime button script for a good way to get messages back to the users, at the same time as avoiding a massive number of writes to flash memory.