Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Open URLs from the command line UNIX
In the Terminal, type "open" and your default browser will launch and open this page. I think this is only possible in 10.2!

[Editor's note: I don't think this worked in 10.1, either (at least not according to this hint). Run "man open" for some other possibilities.]
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)

Open URLs from the command line | 2 comments | Create New Account
Click here to return to the 'Open URLs from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: Open URLs from the command line
Authored by: Miga on Sep 03, '02 04:56:01PM

No, it was already possible in 10.1.5 with April Developer tools installed.

You can use it to open (a) file(s) or (an) URL(s) and specify an application. Without application specified, you open the files with the default application. With the -e option, you open the files with TextEdit, with the -a nameofapplication, you open the files with the specified application

You can also use regular expressions with it. For example:

open /Volumes/Doc/MacFixitForums/??an*.rtf

open all TextEdit files saved as RTF files in the Folder MaxFixitForums on the volume Doc, and which have an a and an n in third and fourth positions. That\'s a very basic example.

Type man open in Terminal to see the documentation and then man regex to know about regular expressions. A tour in man tcsh or any shell you use is worth to learn about using regular expressions.

[ Reply to This | # ]
Re: Open URLs from the command line
Authored by: houchin on Sep 03, '02 10:43:44PM

There's one caveat to this. Sometimes the system doesn't see a URL as a URL, but something else (like a URL to search Mac OS X Hints).

In those cases (actually in all cases), just use "open location" instead of
just open

[ Reply to This | # ]