[ACCEPTED]-Terminal command to open Safari-terminal
If Safari is your default browser, you just 2 use
You can also use this command 1 to open any file with its registered application.
There are several ways to do this. The simplest 5 way would be to use
will open the URL in 4 the standard browser or
/usr/bin/open -a Safari http://stackoverflow.com/
will explicitly use 3 Safari.
You can also use AppleScript via 2 the
javax.script API (JSR 223) but I do not know the 1 syntax right now.
You could use the
open command on MacOS. (see 7
man open for more information about this command).
In 6 your case you can write something like that:
open -a Safari https://www.stackoverflow.com and 5 it works. (NB: Remember to specify the protocol!)
In 4 addition, I wrote an useful script to interact 3 with Safari from MacOS and one of the options 2 of this script is exactly what you want, see 1 it on GitHub here https://github.com/antoniolanza1996/openSafariFromTerminal
More Related questions