Open Process, Interactive Shell on OS X

Sannyasin Brahmanathaswami brahma at hindu.org
Sat Feb 27 20:17:59 EST 2016


 
Has anyone run an interactive shell session of any kind on Mac OS X? If so can you share some code?

in the dictionary it says you cannot use the open process command on OS X to run a unix process. but you should use "shell" instead.  

OK that works... but once you get the result back from shell, how do you continue to interact with that process if it was not opened by "open process"

You can do this:  

put " sftp someUser:somePassWord at somedomain.com" into tCmd


put shell(tCmd) after fld "SFTPsession"


and you get back "Connected to myDomain.com"

But how would continue to interact?

If we do this:

   put " sftp devhap:v1oletR8z4Siva at dev.himalayanacademy.com" into tCmd
   put shell(tCmd) after fld "SFTPsession"
   wait 2 seconds
   put "ls" into tCmd
   put cr & cr &shell(tCmd) after fld "SFTPsession"
   put the result

we get a listing for the current defaultfolder that is the last default folder set by the LC stack we are working in which is a local folder and not a remote listing.

BR








More information about the use-livecode mailing list