~gabriel1984sibiu/octave/octave

« back to all changes in this revision

Viewing changes to doc/interpreter/octave.html/Diary-and-Echo-Commands.html

  • Committer: Grevutiu Gabriel
  • Date: 2014-01-02 13:05:54 UTC
  • Revision ID: gabriel1984sibiu@gmail.com-20140102130554-3r7ivdjln1ni6kcg
New version (3.8.0) from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<html>
 
3
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
 
4
<head>
 
5
<title>GNU Octave: Diary and Echo Commands</title>
 
6
 
 
7
<meta name="description" content="GNU Octave: Diary and Echo Commands">
 
8
<meta name="keywords" content="GNU Octave: Diary and Echo Commands">
 
9
<meta name="resource-type" content="document">
 
10
<meta name="distribution" content="global">
 
11
<meta name="Generator" content="makeinfo">
 
12
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
13
<link href="index.html#Top" rel="start" title="Top">
 
14
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
 
15
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
 
16
<link href="Command-Line-Editing.html#Command-Line-Editing" rel="up" title="Command Line Editing">
 
17
<link href="Errors.html#Errors" rel="next" title="Errors">
 
18
<link href="Customizing-the-Prompt.html#Customizing-the-Prompt" rel="prev" title="Customizing the Prompt">
 
19
<style type="text/css">
 
20
<!--
 
21
a.summary-letter {text-decoration: none}
 
22
blockquote.smallquotation {font-size: smaller}
 
23
div.display {margin-left: 3.2em}
 
24
div.example {margin-left: 3.2em}
 
25
div.indentedblock {margin-left: 3.2em}
 
26
div.lisp {margin-left: 3.2em}
 
27
div.smalldisplay {margin-left: 3.2em}
 
28
div.smallexample {margin-left: 3.2em}
 
29
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
 
30
div.smalllisp {margin-left: 3.2em}
 
31
kbd {font-style:oblique}
 
32
pre.display {font-family: inherit}
 
33
pre.format {font-family: inherit}
 
34
pre.menu-comment {font-family: serif}
 
35
pre.menu-preformatted {font-family: serif}
 
36
pre.smalldisplay {font-family: inherit; font-size: smaller}
 
37
pre.smallexample {font-size: smaller}
 
38
pre.smallformat {font-family: inherit; font-size: smaller}
 
39
pre.smalllisp {font-size: smaller}
 
40
span.nocodebreak {white-space:nowrap}
 
41
span.nolinebreak {white-space:nowrap}
 
42
span.roman {font-family:serif; font-weight:normal}
 
43
span.sansserif {font-family:sans-serif; font-weight:normal}
 
44
ul.no-bullet {list-style: none}
 
45
-->
 
46
</style>
 
47
 
 
48
 
 
49
</head>
 
50
 
 
51
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
 
52
<a name="Diary-and-Echo-Commands"></a>
 
53
<div class="header">
 
54
<p>
 
55
Previous: <a href="Customizing-the-Prompt.html#Customizing-the-Prompt" accesskey="p" rel="prev">Customizing the Prompt</a>, Up: <a href="Command-Line-Editing.html#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
 
56
</div>
 
57
<hr>
 
58
<a name="Diary-and-Echo-Commands-1"></a>
 
59
<h4 class="subsection">2.4.8 Diary and Echo Commands</h4>
 
60
<a name="index-diary-of-commands-and-output"></a>
 
61
<a name="index-command-and-output-logs"></a>
 
62
<a name="index-logging-commands-and-output"></a>
 
63
<a name="index-echoing-executing-commands"></a>
 
64
<a name="index-command-echoing"></a>
 
65
 
 
66
<p>Octave&rsquo;s diary feature allows you to keep a log of all or part of an
 
67
interactive session by recording the input you type and the output that
 
68
Octave produces in a separate file.
 
69
</p>
 
70
<a name="XREFdiary"></a><dl>
 
71
<dt><a name="index-diary"></a>Command: <em></em> <strong>diary</strong></dt>
 
72
<dt><a name="index-diary-1"></a>Command: <em></em> <strong>diary</strong> <em>on</em></dt>
 
73
<dt><a name="index-diary-2"></a>Command: <em></em> <strong>diary</strong> <em>off</em></dt>
 
74
<dt><a name="index-diary-3"></a>Command: <em></em> <strong>diary</strong> <em><var>filename</var></em></dt>
 
75
<dd><p>Record a list of all commands <em>and</em> the output they produce, mixed
 
76
together just as they appear on the terminal.
 
77
</p>
 
78
<p>Valid options are:
 
79
</p>
 
80
<dl compact="compact">
 
81
<dt>on</dt>
 
82
<dd><p>Start recording a session in a file called <samp>diary</samp> in the
 
83
current working directory.
 
84
</p>
 
85
</dd>
 
86
<dt>off</dt>
 
87
<dd><p>Stop recording the session in the diary file.
 
88
</p>
 
89
</dd>
 
90
<dt><var>filename</var></dt>
 
91
<dd><p>Record the session in the file named <var>filename</var>.
 
92
</p></dd>
 
93
</dl>
 
94
 
 
95
<p>With no arguments, <code>diary</code> toggles the current diary state.
 
96
</p>
 
97
<p><strong>See also:</strong> <a href="Commands-For-History.html#XREFhistory">history</a>.
 
98
</p></dd></dl>
 
99
 
 
100
 
 
101
<p>Sometimes it is useful to see the commands in a function or script as
 
102
they are being evaluated.  This can be especially helpful for debugging
 
103
some kinds of problems.
 
104
</p>
 
105
<a name="XREFecho"></a><dl>
 
106
<dt><a name="index-echo"></a>Command: <em></em> <strong>echo</strong> <em>options</em></dt>
 
107
<dd><p>Control whether commands are displayed as they are executed.  Valid
 
108
options are:
 
109
</p>
 
110
<dl compact="compact">
 
111
<dt><code>on</code></dt>
 
112
<dd><p>Enable echoing of commands as they are executed in script files.
 
113
</p>
 
114
</dd>
 
115
<dt><code>off</code></dt>
 
116
<dd><p>Disable echoing of commands as they are executed in script files.
 
117
</p>
 
118
</dd>
 
119
<dt><code>on all</code></dt>
 
120
<dd><p>Enable echoing of commands as they are executed in script files and
 
121
functions.
 
122
</p>
 
123
</dd>
 
124
<dt><code>off all</code></dt>
 
125
<dd><p>Disable echoing of commands as they are executed in script files and
 
126
functions.
 
127
</p></dd>
 
128
</dl>
 
129
 
 
130
<p>With no arguments, <code>echo</code> toggles the current echo state.
 
131
</p></dd></dl>
 
132
 
 
133
 
 
134
<a name="XREFecho_005fexecuting_005fcommands"></a><dl>
 
135
<dt><a name="index-echo_005fexecuting_005fcommands"></a>Built-in Function: <em><var>val</var> =</em> <strong>echo_executing_commands</strong> <em>()</em></dt>
 
136
<dt><a name="index-echo_005fexecuting_005fcommands-1"></a>Built-in Function: <em><var>old_val</var> =</em> <strong>echo_executing_commands</strong> <em>(<var>new_val</var>)</em></dt>
 
137
<dt><a name="index-echo_005fexecuting_005fcommands-2"></a>Built-in Function: <em></em> <strong>echo_executing_commands</strong> <em>(<var>new_val</var>, &quot;local&quot;)</em></dt>
 
138
<dd><p>Query or set the internal variable that controls the echo state.
 
139
It may be the sum of the following values:
 
140
</p>
 
141
<dl compact="compact">
 
142
<dt>1</dt>
 
143
<dd><p>Echo commands read from script files.
 
144
</p>
 
145
</dd>
 
146
<dt>2</dt>
 
147
<dd><p>Echo commands from functions.
 
148
</p>
 
149
</dd>
 
150
<dt>4</dt>
 
151
<dd><p>Echo commands read from command line.
 
152
</p></dd>
 
153
</dl>
 
154
 
 
155
<p>More than one state can be active at once.  For example, a value of 3 is
 
156
equivalent to the command <kbd>echo on all</kbd>.
 
157
</p>
 
158
<p>The value of <code>echo_executing_commands</code> may be set by the <kbd>echo</kbd>
 
159
command or the command line option <samp>--echo-commands</samp>.
 
160
</p>
 
161
<p>When called from inside a function with the <code>&quot;local&quot;</code> option, the
 
162
variable is changed locally for the function and any subroutines it calls.  
 
163
The original variable value is restored when exiting the function.
 
164
</p></dd></dl>
 
165
 
 
166
 
 
167
<hr>
 
168
<div class="header">
 
169
<p>
 
170
Previous: <a href="Customizing-the-Prompt.html#Customizing-the-Prompt" accesskey="p" rel="prev">Customizing the Prompt</a>, Up: <a href="Command-Line-Editing.html#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
 
171
</div>
 
172
 
 
173
 
 
174
 
 
175
</body>
 
176
</html>