What's the difference between LC 'shell' and OSX terminal?

Warren Samples warren at warrensweb.us
Sat Oct 29 11:34:03 EDT 2011

On 10/29/2011 09:40 AM, Graham Samuel wrote:

>     shell(/opt/local/bin/convert)

Mike's response contains all the correct information, but it can be 
distilled to this:

change what you what you type into the message box to:

put shell("/opt/local/bin/convert")

This should display in the message box whatever the terminal displays 
after you type "convert" in Terminal and press enter.

The "put" is what will cause the output to be displayed. On my machine, 
issuing the convert command without any args returns the help. This is 
not uncommon behavior for cli programs.

Also I note that while it is very common to require two hyphens before 
whole word args, 'convert' doesn't seem to use any single letter args 
and only responds to single hyphen (as compiled on my machine) args. 
This is from the help itself: "-help   print program options"


put shell("/opt/local/bin/convert -help")
     ----works for me here, but if not for you, then:

put shell("/opt/local/bin/convert --help")

In an application you might prefer to use "get" in place of "put" before 
your shell().



More information about the Use-livecode mailing list