Change brings opportunity.-Nido Qubein
Yesterday, I received an interesting question from rambler on this blog. He asked if TBS supports system calls. I had to answer no, because I forgot to add them...
However, in TBS alpha-2 system commands will be available with a new system function called "system". This function returns the output of a command you give as an argument. As an example, I ran the following script:
And I got the following output(as expected):!out(~!system(~"whereis tbs"));_die();
And, as you probably would expect, the following:tbs: /usr/bin/tbs
!out(~!system(~"sudo gedit"));_die();
Asks for the password for sudo and then runs gedit as root. So that works.
Actually, that's not what I meant, although this addition is important. :p
ReplyDeletehttp://en.wikipedia.org/wiki/System_call
@rambler Oh I see, forgive me. I was thinking about system commands as in C using system().
ReplyDelete