open is a command line tool that checks to see if it's running in a GUI environment, and then opens the appropriate file based on type. Options for opening to view, print and edit exist.

[Installation instructions]