You can execute a command in the terminal with Applescript like this:

tell application "Terminal"
        do script "echo foo"
end tell

You can execute an AppleScript in the terminal with osascript. You include each 
line of the script as a separate -e parameter. Putting those together this runs 
a one line echo in the Terminal.

osascript -e "tell application \"Terminal\"" -e "do script \"echo foo\"" -e 
"end tell"

Hope this helps,

[fletcher]


> On Jun 20, 2020, at 8:52 AM, Greg Raven <[email protected]> wrote:
> 
> This is probably very simple, but each of my attempts has failed.
> 
> I have a worksheet that opens  CodeKit and GitHub Desktop, but I'd also like 
> it to open Terminal and create a PHP server, too.
> 
> I can create the server from a worksheet command, but I would prefer that it 
> be do in the Terminal.
> 
> I created a separate .sh file with the appropriate PHP command for creating 
> the server, but I can't figure out how to call it.
> 
> Any thoughts?
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "[email protected]" 
> rather than posting here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit <https://twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/77e63b77-3070-4507-9bb9-19a24f0788c2o%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/77e63b77-3070-4507-9bb9-19a24f0788c2o%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/6DB9C820-B692-49BF-ACB8-A800DAFE9616%40cumuli.com.

Reply via email to