I need to merge two osascript scripts, so that with one command I can open a new terminal tab and execute a script like
echo hello into that new tab.
This one opens a new terminal tab.
osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down'
This one opens a new window and runs
osascript -e 'tell app "Terminal" do script "echo hello" end tell'