What is the Mac equivalent of Windows "start" command?
I'm creating a script that runs several other scripts.
I need them to all start up in their own process (read window) so I can review the output of each, but I also need them to run in parallel, so they can't block each other.
In addition, I need to change the current working directory for each process, so doing something like the following isn't working:
osascript -e 'tell app "Terminal" to do script "someScript.sh"'
osascript -e "tell application \"Terminal\" to do script \"cd $(read); ~/path/to/someScript.sh\""
should work. You can replace $(read) with a variable.
FYI, generally speaking, the equivalent of Windows's start
is open
(man). In their simplest usage, they're each the command-line equivalent of double-clicking something in the graphical shell. open
may not be involved in the most efficient means of doing what you're trying to do in this case, however.