Hamilton LaboratoriesHamilton C shell 2012User guideExternal utilities

open

Oregon Coast

open
Previous | Next

        Open a File using the Associated Application

Usage:  open [-h-] [-<verb>] file [ optional-parameters ]

   open opens an arbitrary file using the application
   associated with that file type, based on its filename
   extension.  Under Windows 95 and Window NT version 4.0
   or later, associations are stored in the registry as
   classes with information about what application should
   be used with each type of file and how it works.

   When open is used to open a file, that's always done
   in a different window, though sometimes that may be
   in an existing instance of the application.  For example,
   opening a Microsoft Word document will start a new
   process running Word if one is not already running.
   But if Word's already running, then Word will simply open
   yet another child window with the specified file.  The
   choice of whether to start another instance of an already-
   running application versus having it simply open another
   child window is defined by the application and the entries
   in the registry, not by open.

   Both data files and ordinary executable files can be
   opened with open.  If it's an ordinary executable,
   additional arguments can be specified, which are simply
   passed as command line (argc, argv) arguments to the
   child process.  Optional parameters aren't generally
   meaningful when opening data files, though usually all
   that happens is that they're ignored.  The exception
   would be script files that can take arguments.

   Once the associated application has been started, open
   exits.  It does not wait for the child application to
   complete.

Options:

   -h         Help
   -<verb>    Open the file and perform the action indicated
              by the verb, e.g., 'print'.  The list of verbs
              that may be used depends on the application.
              The default is simply to open the file.
   --         End of options

Previous | Next