lc shell and command line

Mike Bonner bonnmike at gmail.com
Mon Nov 14 09:57:04 EST 2011


you can use a semicolon as command delimiter.

So you could do shell("command 1; command 2; command 3") and it would do
them in succession.
However rather than su to root its a much better idea to use sudo.

Beyond that, it might be easier to use open process so that you can open a
persistant connection to a shell. Something like : 'open process
"/bin/bash" for update'. Haven't done it, so you'd have to determine the
steps require to get your job done.  It would allow you to send send
passwords and run scripts in a persistent environment this way.

as for using cd in a shell() call, its much easier to just set the
defaultfolder then any following shells will execute from the context you
set.

On Mon, Nov 14, 2011 at 7:31 AM, Peter Alcibiades <
palcibiades-first at yahoo.co.uk> wrote:

> Bernard, many thanks, yes, that works.  Can I ask one more question, how
> then
> would you get the shell to interact, like if you do su and want to get the
> password in, and then run a script that requires root password?  Or maybe
> all that has to be done in shell?
>
> Peter
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/lc-shell-and-command-line-tp4036681p4039639.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list