Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 3e60ff9d4d6f58c8fbd17208f14089fa > files > 383

octave-doc-3.2.3-3mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>Startup Files - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Invoking-Octave-from-the-Command-Line.html#Invoking-Octave-from-the-Command-Line" title="Invoking Octave from the Command Line">
<link rel="prev" href="Command-Line-Options.html#Command-Line-Options" title="Command Line Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="Startup-Files"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Command-Line-Options.html#Command-Line-Options">Command Line Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Invoking-Octave-from-the-Command-Line.html#Invoking-Octave-from-the-Command-Line">Invoking Octave from the Command Line</a>
<hr>
</div>

<h4 class="subsection">2.1.2 Startup Files</h4>

<p><a name="index-initialization-68"></a><a name="index-startup-69"></a>
When Octave starts, it looks for commands to execute from the files in
the following list.  These files may contain any valid Octave commands,
including function definitions.

   <p><a name="index-startup-files-70"></a>
     <dl>
<dt><var>octave-home</var><code>/share/octave/site/m/startup/octaverc</code><dd><a name="index-site-startup-file-71"></a>where <var>octave-home</var> is the directory in which Octave is installed
(the default is <samp><span class="file">/usr</span></samp>). 
This file is provided so that changes to the default Octave environment
can be made globally for all users at your site for all versions of Octave
you have installed.  Care should be taken when making changes to this file
since all users of Octave at your site will be affected.  The default file
may be overridden by the environment variable <code>OCTAVE_SITE_INITFILE</code><!-- /@w -->.

     <br><dt><var>octave-home</var><code>/share/octave/</code><var>version</var><code>/m/startup/octaverc</code><dd><a name="index-version-startup-file-72"></a>where <var>octave-home</var> is the directory in which Octave is
installed (the default is <samp><span class="file">/usr</span></samp>), and <var>version</var>
is the version number of Octave.  This file is provided so that changes
to the default Octave environment can be made globally for all users of
a particular version of Octave.  Care should be taken when making
changes to this file since all users of Octave at your site will be
affected.  The default file may be overridden by the environment variable
<code>OCTAVE_VERSION_INITFILE</code><!-- /@w -->.

     <br><dt><code>~/.octaverc</code><dd><a name="index-personal-startup-file-73"></a><a name="index-g_t_0040code_007b_007e_002f_002eoctaverc_007d-74"></a>This file is used to make personal changes to the default
Octave environment.

     <br><dt><code>.octaverc</code><dd><a name="index-project-startup-file-75"></a><a name="index-g_t_0040code_007b_002eoctaverc_007d-76"></a>This file can be used to make changes to the default Octave environment
for a particular project.  Octave searches for this file in the current
directory after it reads <samp><span class="file">~/.octaverc</span></samp>.  Any use of the <code>cd</code>
command in the <samp><span class="file">~/.octaverc</span></samp> file will affect the directory where
Octave searches for <samp><span class="file">.octaverc</span></samp>.

     <p>If you start Octave in your home directory, commands from the file
<samp><span class="file">~/.octaverc</span></samp> will only be executed once. 
</dl>

   <p>A message will be displayed as each of the startup files is read if you
invoke Octave with the <code>--verbose</code> option but without the
<code>--silent</code> option.

   </body></html>