Mercurial > octave-antonio
annotate doc/interpreter/system.txi @ 20024:cf9b94a89620
Document get_home_directory in Octave manual and NEWS file.
* NEWS: Add get_home_directory to list of new functions.
* system.txi: Add get_home_directory to manual.
* sysdep.cc(Fget_home_directory): Use preferred docstring format of single line
summary sentence followed by second paragragh of explanation. Add BIST test.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 02 Apr 2015 15:36:38 -0700 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
19596
diff
changeset
|
1 @c Copyright (C) 1996-2015 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
9 @c |
7018 | 10 @c Octave is distributed in the hope that it will be useful, but WITHOUT |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
14 @c |
7018 | 15 @c You should have received a copy of the GNU General Public License |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
4167 | 19 @node System Utilities |
3294 | 20 @chapter System Utilities |
21 | |
22 This chapter describes the functions that are available to allow you to | |
23 get information about what is happening outside of Octave, while it is | |
24 still running, and use this information in your program. For example, | |
25 you can get information about environment variables, the current time, | |
26 and even start other programs from the Octave prompt. | |
27 | |
28 @menu | |
17152
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
29 * Timing Utilities:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
30 * Filesystem Utilities:: |
6549 | 31 * File Archiving Utilities:: |
32 * Networking Utilities:: | |
17152
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
33 * Controlling Subprocesses:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
34 * Process ID Information:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
35 * Environment Variables:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
36 * Current Working Directory:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
37 * Password Database Functions:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
38 * Group Database Functions:: |
f2a8592b8fbd
doc: Shorten some long subsection names in Manual.
Rik <rik@octave.org>
parents:
17097
diff
changeset
|
39 * System Information:: |
6702 | 40 * Hashing Functions:: |
3294 | 41 @end menu |
42 | |
4167 | 43 @node Timing Utilities |
3294 | 44 @section Timing Utilities |
45 | |
46 Octave's core set of functions for manipulating time values are | |
47 patterned after the corresponding functions from the standard C library. | |
48 Several of these functions use a data structure for time that includes | |
49 the following elements: | |
50 | |
51 @table @code | |
52 @item usec | |
53 Microseconds after the second (0-999999). | |
54 | |
55 @item sec | |
14570
d07d96e53612
seconds after the minute can be 0-60, not 0-61
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
56 Seconds after the minute (0-60). This number can be 60 to account |
3294 | 57 for leap seconds. |
58 | |
59 @item min | |
60 Minutes after the hour (0-59). | |
61 | |
62 @item hour | |
63 Hours since midnight (0-23). | |
64 | |
65 @item mday | |
66 Day of the month (1-31). | |
67 | |
68 @item mon | |
69 Months since January (0-11). | |
70 | |
71 @item year | |
72 Years since 1900. | |
73 | |
74 @item wday | |
75 Days since Sunday (0-6). | |
76 | |
77 @item yday | |
78 Days since January 1 (0-365). | |
79 | |
80 @item isdst | |
81 Daylight Savings Time flag. | |
82 | |
83 @item zone | |
84 Time zone. | |
85 @end table | |
86 | |
87 @noindent | |
88 In the descriptions of the following functions, this structure is | |
89 referred to as a @var{tm_struct}. | |
90 | |
3301 | 91 @DOCSTRING(time) |
3294 | 92 |
6502 | 93 @DOCSTRING(now) |
94 | |
3294 | 95 @DOCSTRING(ctime) |
96 | |
3301 | 97 @DOCSTRING(gmtime) |
3294 | 98 |
3301 | 99 @DOCSTRING(localtime) |
3294 | 100 |
3301 | 101 @DOCSTRING(mktime) |
3294 | 102 |
3301 | 103 @DOCSTRING(asctime) |
3294 | 104 |
105 @DOCSTRING(strftime) | |
106 | |
4169 | 107 @DOCSTRING(strptime) |
108 | |
3294 | 109 Most of the remaining functions described in this section are not |
110 patterned after the standard C library. Some are available for | |
9079
4d610aba7347
Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
111 compatibility with @sc{matlab} and others are provided because they are |
3294 | 112 useful. |
113 | |
3301 | 114 @DOCSTRING(clock) |
3294 | 115 |
3301 | 116 @DOCSTRING(date) |
3294 | 117 |
3301 | 118 @DOCSTRING(etime) |
3294 | 119 |
3301 | 120 @DOCSTRING(cputime) |
3294 | 121 |
3301 | 122 @DOCSTRING(is_leap_year) |
3294 | 123 |
17097
e7a059a9a644
doc: Use XREF as anchor prefix in documentation for clearer results in Info viewer.
Rik <rik@octave.org>
parents:
16812
diff
changeset
|
124 @anchor{XREFtoc} |
3301 | 125 @DOCSTRING(tic) |
3294 | 126 |
3301 | 127 @DOCSTRING(pause) |
3294 | 128 |
3301 | 129 @DOCSTRING(sleep) |
3294 | 130 |
3301 | 131 @DOCSTRING(usleep) |
3294 | 132 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
133 @DOCSTRING(datenum) |
6502 | 134 |
135 @DOCSTRING(datestr) | |
136 | |
137 @DOCSTRING(datevec) | |
138 | |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
139 @DOCSTRING(addtodate) |
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
140 |
6502 | 141 @DOCSTRING(calendar) |
142 | |
143 @DOCSTRING(weekday) | |
144 | |
145 @DOCSTRING(eomday) | |
146 | |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
147 @DOCSTRING(datetick) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
148 |
4167 | 149 @node Filesystem Utilities |
3294 | 150 @section Filesystem Utilities |
151 | |
12575
d0b799dafede
Grammarcheck files for 3.4.1 release.
Rik <octave@nomad.inbox5.com>
parents:
12568
diff
changeset
|
152 Octave includes many utility functions for copying, moving, renaming, and |
d0b799dafede
Grammarcheck files for 3.4.1 release.
Rik <octave@nomad.inbox5.com>
parents:
12568
diff
changeset
|
153 deleting files; for creating, reading, and deleting directories; for retrieving |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
154 status information on files; and for manipulating file and path names. |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
155 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
156 @DOCSTRING(movefile) |
3294 | 157 |
3301 | 158 @DOCSTRING(rename) |
3294 | 159 |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
160 @DOCSTRING(copyfile) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
161 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
162 @DOCSTRING(unlink) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
163 |
3710 | 164 @DOCSTRING(link) |
165 | |
166 @DOCSTRING(symlink) | |
167 | |
4169 | 168 @DOCSTRING(readlink) |
169 | |
3301 | 170 @DOCSTRING(mkdir) |
3294 | 171 |
3301 | 172 @DOCSTRING(rmdir) |
3294 | 173 |
6550 | 174 @DOCSTRING(confirm_recursive_rmdir) |
175 | |
3301 | 176 @DOCSTRING(mkfifo) |
3294 | 177 |
3301 | 178 @DOCSTRING(umask) |
3294 | 179 |
17097
e7a059a9a644
doc: Use XREF as anchor prefix in documentation for clearer results in Info viewer.
Rik <rik@octave.org>
parents:
16812
diff
changeset
|
180 @anchor{XREFlstat} |
3301 | 181 @DOCSTRING(stat) |
3294 | 182 |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
183 @DOCSTRING(S_ISBLK) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
184 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
185 @DOCSTRING(S_ISCHR) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
186 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
187 @DOCSTRING(S_ISDIR) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
188 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
189 @DOCSTRING(S_ISFIFO) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
190 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
191 @DOCSTRING(S_ISLNK) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
192 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
193 @DOCSTRING(S_ISREG) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
194 |
12212
f1ab2a12b4f4
Add S_ISSOCK function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12211
diff
changeset
|
195 @DOCSTRING(S_ISSOCK) |
f1ab2a12b4f4
Add S_ISSOCK function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12211
diff
changeset
|
196 |
6549 | 197 @DOCSTRING(fileattrib) |
198 | |
199 @DOCSTRING(isdir) | |
200 | |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
201 @DOCSTRING(readdir) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
202 |
3301 | 203 @DOCSTRING(glob) |
3294 | 204 |
3301 | 205 @DOCSTRING(file_in_path) |
3294 | 206 |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
207 @DOCSTRING(filesep) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
208 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
209 @DOCSTRING(filemarker) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
210 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
211 @DOCSTRING(fileparts) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
212 |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
213 @DOCSTRING(fullfile) |
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
214 |
3301 | 215 @DOCSTRING(tilde_expand) |
3294 | 216 |
6549 | 217 @DOCSTRING(canonicalize_file_name) |
218 | |
12211
11faa69c4eaa
Add S_ISBLK and family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12208
diff
changeset
|
219 @DOCSTRING(make_absolute_filename) |
6549 | 220 |
8817
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8653
diff
changeset
|
221 @DOCSTRING(is_absolute_filename) |
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8653
diff
changeset
|
222 |
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8653
diff
changeset
|
223 @DOCSTRING(is_rooted_relative_filename) |
03b7f618ab3d
include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents:
8653
diff
changeset
|
224 |
13843
c299b26d0e6b
missing change from changeset 69afe121f07e
John W. Eaton <jwe@octave.org>
parents:
12580
diff
changeset
|
225 @DOCSTRING(recycle) |
c299b26d0e6b
missing change from changeset 69afe121f07e
John W. Eaton <jwe@octave.org>
parents:
12580
diff
changeset
|
226 |
6549 | 227 @node File Archiving Utilities |
228 @section File Archiving Utilities | |
229 | |
230 @DOCSTRING(bunzip2) | |
231 | |
6868 | 232 @DOCSTRING(gzip) |
233 | |
6549 | 234 @DOCSTRING(gunzip) |
235 | |
236 @DOCSTRING(tar) | |
237 | |
238 @DOCSTRING(untar) | |
239 | |
240 @DOCSTRING(zip) | |
241 | |
242 @DOCSTRING(unzip) | |
243 | |
244 @DOCSTRING(unpack) | |
245 | |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
246 @DOCSTRING(bzip2) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
247 |
6549 | 248 @node Networking Utilities |
249 @section Networking Utilities | |
250 | |
9880 | 251 @menu |
11255
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
252 * FTP Objects:: |
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
253 * URL Manipulation:: |
16812
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
254 * Base64 and Binary Data Transmission:: |
9880 | 255 @end menu |
256 | |
12514
e5e66c389597
Add gethostname to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12512
diff
changeset
|
257 @DOCSTRING(gethostname) |
e5e66c389597
Add gethostname to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12512
diff
changeset
|
258 |
11255
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
259 @node FTP Objects |
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
260 @subsection FTP Objects |
9880 | 261 |
14217
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
262 Octave supports the FTP protocol through an object-oriented interface. |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
263 Use the function @code{ftp} to create an FTP object which represents the |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
264 connection. All FTP functions take an FTP object as the first argument. |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
265 |
9891
1506a17832c9
doc building fixes for class methods
John W. Eaton <jwe@octave.org>
parents:
9880
diff
changeset
|
266 @DOCSTRING(@ftp/ftp) |
9880 | 267 |
14217
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
268 @DOCSTRING(@ftp/close) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
269 |
9891
1506a17832c9
doc building fixes for class methods
John W. Eaton <jwe@octave.org>
parents:
9880
diff
changeset
|
270 @DOCSTRING(@ftp/mget) |
9880 | 271 |
9891
1506a17832c9
doc building fixes for class methods
John W. Eaton <jwe@octave.org>
parents:
9880
diff
changeset
|
272 @DOCSTRING(@ftp/mput) |
9880 | 273 |
14217
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
274 @DOCSTRING(@ftp/cd) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
275 |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
276 @DOCSTRING(@ftp/dir) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
277 |
9891
1506a17832c9
doc building fixes for class methods
John W. Eaton <jwe@octave.org>
parents:
9880
diff
changeset
|
278 @DOCSTRING(@ftp/ascii) |
9880 | 279 |
9891
1506a17832c9
doc building fixes for class methods
John W. Eaton <jwe@octave.org>
parents:
9880
diff
changeset
|
280 @DOCSTRING(@ftp/binary) |
9880 | 281 |
14217
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
282 @DOCSTRING(@ftp/delete) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
283 |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
284 @DOCSTRING(@ftp/rename) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
285 |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
286 @DOCSTRING(@ftp/mkdir) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
287 |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
288 @DOCSTRING(@ftp/rmdir) |
7912e682aa30
doc: Update docstrings for @ftp class.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
289 |
11255
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
290 @node URL Manipulation |
d682cd6669ac
Update info-based documentation menus to include new nodes.
Rik <octave@nomad.inbox5.com>
parents:
9891
diff
changeset
|
291 @subsection URL Manipulation |
9880 | 292 |
6549 | 293 @DOCSTRING(urlread) |
294 | |
295 @DOCSTRING(urlwrite) | |
296 | |
16812
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
297 @node Base64 and Binary Data Transmission |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
298 @subsection Base64 and Binary Data Transmission |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
299 |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
300 Some transmission channels can not accept binary data. It is customary to |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
301 encode binary data in Base64 for transmission and to decode the data upon |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
302 reception. |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
303 |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
304 @DOCSTRING(base64_encode) |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
305 |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
306 @DOCSTRING(base64_decode) |
366a13bd71d5
doc: Add base64_encode()/base64_decode() to documentation.
Rik <rik@octave.org>
parents:
16772
diff
changeset
|
307 |
4167 | 308 @node Controlling Subprocesses |
3294 | 309 @section Controlling Subprocesses |
310 | |
311 Octave includes some high-level commands like @code{system} and | |
312 @code{popen} for starting subprocesses. If you want to run another | |
313 program to perform some task and then look at its output, you will | |
314 probably want to use these functions. | |
315 | |
316 Octave also provides several very low-level Unix-like functions which | |
317 can also be used for starting subprocesses, but you should probably only | |
318 use them if you can't find any way to do what you need with the | |
319 higher-level functions. | |
320 | |
3301 | 321 @DOCSTRING(system) |
3294 | 322 |
6549 | 323 @DOCSTRING(unix) |
324 | |
325 @DOCSTRING(dos) | |
326 | |
19271
030d56f67363
implement the open function
John W. Eaton <jwe@octave.org>
parents:
19167
diff
changeset
|
327 @DOCSTRING(open) |
030d56f67363
implement the open function
John W. Eaton <jwe@octave.org>
parents:
19167
diff
changeset
|
328 |
7984
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
329 @DOCSTRING(perl) |
bbaa5d7d0143
Some documentation updates
David Bateman <dbateman@free.fr>
parents:
7018
diff
changeset
|
330 |
13859
6d59b141e65d
Add python to manual and respect format rules of copyright block
Carnë Draug <carandraug+dev@gmail.com>
parents:
12580
diff
changeset
|
331 @DOCSTRING(python) |
6d59b141e65d
Add python to manual and respect format rules of copyright block
Carnë Draug <carandraug+dev@gmail.com>
parents:
12580
diff
changeset
|
332 |
3301 | 333 @DOCSTRING(popen) |
3294 | 334 |
3301 | 335 @DOCSTRING(pclose) |
3294 | 336 |
3301 | 337 @DOCSTRING(popen2) |
3294 | 338 |
3301 | 339 @DOCSTRING(EXEC_PATH) |
3294 | 340 |
341 In most cases, the following functions simply decode their arguments and | |
342 make the corresponding Unix system calls. For a complete example of how | |
343 they can be used, look at the definition of the function @code{popen2}. | |
344 | |
3301 | 345 @DOCSTRING(fork) |
3294 | 346 |
3301 | 347 @DOCSTRING(exec) |
3294 | 348 |
3301 | 349 @DOCSTRING(pipe) |
3294 | 350 |
3301 | 351 @DOCSTRING(dup2) |
3294 | 352 |
3301 | 353 @DOCSTRING(waitpid) |
3294 | 354 |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
355 @DOCSTRING(WCONTINUE) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
356 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
357 @DOCSTRING(WCOREDUMP) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
358 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
359 @DOCSTRING(WEXITSTATUS) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
360 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
361 @DOCSTRING(WIFCONTINUED) |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
362 |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
363 @DOCSTRING(WIFSIGNALED) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
364 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
365 @DOCSTRING(WIFSTOPPED) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
366 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
367 @DOCSTRING(WIFEXITED) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
368 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
369 @DOCSTRING(WNOHANG) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
370 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
371 @DOCSTRING(WSTOPSIG) |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
372 |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
373 @DOCSTRING(WTERMSIG) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
374 |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
375 @DOCSTRING(WUNTRACED) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
376 |
3301 | 377 @DOCSTRING(fcntl) |
3294 | 378 |
6549 | 379 @DOCSTRING(kill) |
380 | |
381 @DOCSTRING(SIG) | |
382 | |
4167 | 383 @node Process ID Information |
3294 | 384 @section Process, Group, and User IDs |
385 | |
3301 | 386 @DOCSTRING(getpgrp) |
3294 | 387 |
3301 | 388 @DOCSTRING(getpid) |
3294 | 389 |
3301 | 390 @DOCSTRING(getppid) |
3294 | 391 |
3301 | 392 @DOCSTRING(geteuid) |
3294 | 393 |
3301 | 394 @DOCSTRING(getuid) |
3294 | 395 |
3301 | 396 @DOCSTRING(getegid) |
3294 | 397 |
3301 | 398 @DOCSTRING(getgid) |
3294 | 399 |
4167 | 400 @node Environment Variables |
3294 | 401 @section Environment Variables |
402 | |
3301 | 403 @DOCSTRING(getenv) |
3294 | 404 |
19167
6f0290863d50
Add new function unsetenv from gnulib to Octave.
Rik <rik@octave.org>
parents:
19128
diff
changeset
|
405 @DOCSTRING(setenv) |
6f0290863d50
Add new function unsetenv from gnulib to Octave.
Rik <rik@octave.org>
parents:
19128
diff
changeset
|
406 |
6f0290863d50
Add new function unsetenv from gnulib to Octave.
Rik <rik@octave.org>
parents:
19128
diff
changeset
|
407 @DOCSTRING(unsetenv) |
3294 | 408 |
20024
cf9b94a89620
Document get_home_directory in Octave manual and NEWS file.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
409 @DOCSTRING(get_home_directory) |
cf9b94a89620
Document get_home_directory in Octave manual and NEWS file.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
410 |
4167 | 411 @node Current Working Directory |
3294 | 412 @section Current Working Directory |
413 | |
3301 | 414 @DOCSTRING(cd) |
3294 | 415 |
3301 | 416 @DOCSTRING(ls) |
3294 | 417 |
6549 | 418 @DOCSTRING(ls_command) |
419 | |
420 @DOCSTRING(dir) | |
421 | |
3301 | 422 @DOCSTRING(pwd) |
3294 | 423 |
4167 | 424 @node Password Database Functions |
3294 | 425 @section Password Database Functions |
426 | |
427 Octave's password database functions return information in a structure | |
428 with the following fields. | |
429 | |
430 @table @code | |
431 @item name | |
432 The user name. | |
433 | |
434 @item passwd | |
435 The encrypted password, if available. | |
436 | |
437 @item uid | |
438 The numeric user id. | |
439 | |
440 @item gid | |
441 The numeric group id. | |
442 | |
443 @item gecos | |
444 The GECOS field. | |
445 | |
446 @item dir | |
447 The home directory. | |
448 | |
449 @item shell | |
450 The initial shell. | |
451 @end table | |
452 | |
453 In the descriptions of the following functions, this data structure is | |
454 referred to as a @var{pw_struct}. | |
455 | |
3301 | 456 @DOCSTRING(getpwent) |
3294 | 457 |
3301 | 458 @DOCSTRING(getpwuid) |
3294 | 459 |
3301 | 460 @DOCSTRING(getpwnam) |
3294 | 461 |
3301 | 462 @DOCSTRING(setpwent) |
3294 | 463 |
3301 | 464 @DOCSTRING(endpwent) |
3294 | 465 |
4167 | 466 @node Group Database Functions |
3294 | 467 @section Group Database Functions |
468 | |
469 Octave's group database functions return information in a structure | |
470 with the following fields. | |
471 | |
472 @table @code | |
473 @item name | |
474 The user name. | |
475 | |
476 @item passwd | |
477 The encrypted password, if available. | |
478 | |
479 @item gid | |
480 The numeric group id. | |
481 | |
482 @item mem | |
483 The members of the group. | |
484 @end table | |
485 | |
486 In the descriptions of the following functions, this data structure is | |
487 referred to as a @var{grp_struct}. | |
488 | |
3301 | 489 @DOCSTRING(getgrent) |
3294 | 490 |
3301 | 491 @DOCSTRING(getgrgid) |
17281
bc924baa2c4e
doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents:
17152
diff
changeset
|
492 |
3301 | 493 @DOCSTRING(getgrnam) |
3294 | 494 |
3301 | 495 @DOCSTRING(setgrent) |
3294 | 496 |
3301 | 497 @DOCSTRING(endgrent) |
3294 | 498 |
4167 | 499 @node System Information |
3294 | 500 @section System Information |
501 | |
3301 | 502 @DOCSTRING(computer) |
3294 | 503 |
6549 | 504 @DOCSTRING(uname) |
505 | |
12512
77b14e634166
Replace nprocs with nproc function. Use gnulib module for portability across platforms.
Iain Murray <iain@iainmurray.net>
parents:
12510
diff
changeset
|
506 @DOCSTRING(nproc) |
12510
a1b2da4967ac
Add nproc, nproc_conf utility functions for determining number of available processors.
Iain Murray <iain@iainmurray.net>
parents:
12212
diff
changeset
|
507 |
6549 | 508 @DOCSTRING(ispc) |
509 | |
510 @DOCSTRING(isunix) | |
511 | |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
512 @DOCSTRING(ismac) |
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
513 |
3301 | 514 @DOCSTRING(isieee) |
3294 | 515 |
12568
b22816427ce9
Add isdeployed function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12514
diff
changeset
|
516 @DOCSTRING(isdeployed) |
b22816427ce9
Add isdeployed function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12514
diff
changeset
|
517 |
19128
4990d5988cf5
new function, isstudent (bug #43155)
John W. Eaton <jwe@octave.org>
parents:
19120
diff
changeset
|
518 @DOCSTRING(isstudent) |
4990d5988cf5
new function, isstudent (bug #43155)
John W. Eaton <jwe@octave.org>
parents:
19120
diff
changeset
|
519 |
6623 | 520 @DOCSTRING(OCTAVE_HOME) |
521 | |
12208
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
522 @DOCSTRING(matlabroot) |
3294 | 523 |
12208
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
524 @DOCSTRING(OCTAVE_VERSION) |
8286
6f2d95255911
fix @seealso references to point to existing anchors
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7984
diff
changeset
|
525 |
6623 | 526 @DOCSTRING(version) |
527 | |
528 @DOCSTRING(ver) | |
529 | |
12208
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
530 @DOCSTRING(compare_versions) |
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
531 |
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
532 @DOCSTRING(license) |
9611014e7cf1
Add function compare_versions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11535
diff
changeset
|
533 |
3301 | 534 @DOCSTRING(octave_config_info) |
3294 | 535 |
3301 | 536 @DOCSTRING(getrusage) |
6702 | 537 |
538 @node Hashing Functions | |
539 @section Hashing Functions | |
540 | |
541 It is often necessary to find if two strings or files are | |
9079
4d610aba7347
Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
542 identical. This might be done by comparing them character by character |
4d610aba7347
Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
543 and looking for differences. However, this can be slow, and so comparing |
6702 | 544 a hash of the string or file can be a rapid way of finding if the files |
545 differ. | |
546 | |
9079
4d610aba7347
Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
547 Another use of the hashing function is to check for file integrity. The |
6702 | 548 user can check the hash of the file against a known value and find if |
549 the file they have is the same as the one that the original hash was | |
550 produced with. | |
551 | |
7007 | 552 Octave supplies the @code{md5sum} function to perform MD5 hashes on |
9079
4d610aba7347
Cleanup documentation for system.texi, package.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
553 strings and files. An example of the use of @code{md5sum} function might |
6702 | 554 be |
555 | |
556 @example | |
557 @group | |
558 if exist (file, "file") | |
559 hash = md5sum (file); | |
560 else | |
561 # Treat the variable "file" as a string | |
562 hash = md5sum (file, true); | |
563 endif | |
564 @end group | |
565 @end example | |
566 | |
567 @DOCSTRING(md5sum) |