1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2008. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter General Commands |
---|
10 | |
---|
11 | @section Introduction |
---|
12 | |
---|
13 | The RTEMS shell has the following general commands: |
---|
14 | |
---|
15 | @itemize @bullet |
---|
16 | |
---|
17 | @item @code{alias} - Add alias for an existing command |
---|
18 | @item @code{date} - Print current date and time |
---|
19 | @item @code{id} - show uid gid euid and egid |
---|
20 | @item @code{tty} - show ttyname |
---|
21 | @item @code{whoami} - show current user |
---|
22 | @item @code{logoff} - logoff from the system |
---|
23 | @item @code{exit} - alias for logoff command |
---|
24 | |
---|
25 | @end itemize |
---|
26 | |
---|
27 | @section Commands |
---|
28 | |
---|
29 | @c |
---|
30 | @c |
---|
31 | @c |
---|
32 | @page |
---|
33 | @subsection alias - add alias for an existing command |
---|
34 | |
---|
35 | @pgindex alias |
---|
36 | |
---|
37 | @subheading SYNOPSYS: |
---|
38 | |
---|
39 | @example |
---|
40 | alias oldCommand newCommand |
---|
41 | @end example |
---|
42 | |
---|
43 | @subheading DESCRIPTION: |
---|
44 | |
---|
45 | This command adds an alternate name for an existing command to |
---|
46 | the command set. |
---|
47 | |
---|
48 | @subheading EXIT STATUS: |
---|
49 | |
---|
50 | This command returns 0 on success and non-zero if an error is encountered. |
---|
51 | |
---|
52 | @subheading NOTES: |
---|
53 | |
---|
54 | NONE |
---|
55 | |
---|
56 | @subheading EXAMPLES: |
---|
57 | |
---|
58 | The following is an example of how to use @code{alias}: |
---|
59 | |
---|
60 | @example |
---|
61 | SHLL [/] $ me |
---|
62 | shell:me command not found |
---|
63 | SHLL [/] $ alias whoami me |
---|
64 | SHLL [/] $ me |
---|
65 | rtems |
---|
66 | SHLL [/] $ whoami |
---|
67 | rtems |
---|
68 | @end example |
---|
69 | |
---|
70 | @subheading CONFIGURATION: |
---|
71 | |
---|
72 | @findex CONFIGURE_SHELL_NO_COMMAND_ALIAS |
---|
73 | @findex CONFIGURE_SHELL_COMMAND_ALIAS |
---|
74 | |
---|
75 | This command is included in the default shell command set. |
---|
76 | When building a custom command set, define |
---|
77 | @code{CONFIGURE_SHELL_COMMAND_ALIAS} to have this |
---|
78 | command included. |
---|
79 | |
---|
80 | This command can be excluded from the shell command set by |
---|
81 | defining @code{CONFIGURE_SHELL_NO_COMMAND_ALIAS} when all |
---|
82 | shell commands have been configured. |
---|
83 | |
---|
84 | @subheading PROGRAMMING INFORMATION: |
---|
85 | |
---|
86 | @findex rtems_shell_rtems_main_alias |
---|
87 | |
---|
88 | The @code{alias} is implemented by a C language function |
---|
89 | which has the following prototype: |
---|
90 | |
---|
91 | @example |
---|
92 | int rtems_shell_rtems_main_alias( |
---|
93 | int argc, |
---|
94 | char **argv |
---|
95 | ); |
---|
96 | @end example |
---|
97 | |
---|
98 | The configuration structure for the @code{alias} has the |
---|
99 | following prototype: |
---|
100 | |
---|
101 | @example |
---|
102 | extern rtems_shell_cmd_t rtems_shell_ALIAS_Command; |
---|
103 | @end example |
---|
104 | |
---|
105 | @c |
---|
106 | @c |
---|
107 | @c |
---|
108 | @page |
---|
109 | @subsection date - print current date and time |
---|
110 | |
---|
111 | @pgindex date |
---|
112 | |
---|
113 | @subheading SYNOPSYS: |
---|
114 | |
---|
115 | @example |
---|
116 | date |
---|
117 | @end example |
---|
118 | |
---|
119 | @subheading DESCRIPTION: |
---|
120 | |
---|
121 | This command XXX |
---|
122 | |
---|
123 | @subheading EXIT STATUS: |
---|
124 | |
---|
125 | This command returns 0 on success and non-zero if an error is encountered. |
---|
126 | |
---|
127 | @subheading NOTES: |
---|
128 | |
---|
129 | NONE |
---|
130 | |
---|
131 | @subheading EXAMPLES: |
---|
132 | |
---|
133 | The following is an example of how to use @code{date}: |
---|
134 | |
---|
135 | @example |
---|
136 | EXAMPLE_TBD |
---|
137 | @end example |
---|
138 | |
---|
139 | @subheading CONFIGURATION: |
---|
140 | |
---|
141 | @findex CONFIGURE_SHELL_NO_COMMAND_DATE |
---|
142 | @findex CONFIGURE_SHELL_COMMAND_DATE |
---|
143 | |
---|
144 | This command is included in the default shell command set. |
---|
145 | When building a custom command set, define |
---|
146 | @code{CONFIGURE_SHELL_COMMAND_DATE} to have this |
---|
147 | command included. |
---|
148 | |
---|
149 | This command can be excluded from the shell command set by |
---|
150 | defining @code{CONFIGURE_SHELL_NO_COMMAND_DATE} when all |
---|
151 | shell commands have been configured. |
---|
152 | |
---|
153 | @subheading PROGRAMMING INFORMATION: |
---|
154 | |
---|
155 | @findex rtems_shell_rtems_main_date |
---|
156 | |
---|
157 | The @code{date} is implemented by a C language function |
---|
158 | which has the following prototype: |
---|
159 | |
---|
160 | @example |
---|
161 | int rtems_shell_rtems_main_date( |
---|
162 | int argc, |
---|
163 | char **argv |
---|
164 | ); |
---|
165 | @end example |
---|
166 | |
---|
167 | The configuration structure for the @code{date} has the |
---|
168 | following prototype: |
---|
169 | |
---|
170 | @example |
---|
171 | extern rtems_shell_cmd_t rtems_shell_DATE_Command; |
---|
172 | @end example |
---|
173 | |
---|
174 | @c |
---|
175 | @c |
---|
176 | @c |
---|
177 | @page |
---|
178 | @subsection id - show uid gid euid and egid |
---|
179 | |
---|
180 | @pgindex id |
---|
181 | |
---|
182 | @subheading SYNOPSYS: |
---|
183 | |
---|
184 | @example |
---|
185 | id |
---|
186 | @end example |
---|
187 | |
---|
188 | @subheading DESCRIPTION: |
---|
189 | |
---|
190 | This command XXX |
---|
191 | |
---|
192 | @subheading EXIT STATUS: |
---|
193 | |
---|
194 | This command returns 0 on success and non-zero if an error is encountered. |
---|
195 | |
---|
196 | @subheading NOTES: |
---|
197 | |
---|
198 | NONE |
---|
199 | |
---|
200 | @subheading EXAMPLES: |
---|
201 | |
---|
202 | The following is an example of how to use @code{id}: |
---|
203 | |
---|
204 | @example |
---|
205 | EXAMPLE_TBD |
---|
206 | @end example |
---|
207 | |
---|
208 | @subheading CONFIGURATION: |
---|
209 | |
---|
210 | @findex CONFIGURE_SHELL_NO_COMMAND_ID |
---|
211 | @findex CONFIGURE_SHELL_COMMAND_ID |
---|
212 | |
---|
213 | This command is included in the default shell command set. |
---|
214 | When building a custom command set, define |
---|
215 | @code{CONFIGURE_SHELL_COMMAND_ID} to have this |
---|
216 | command included. |
---|
217 | |
---|
218 | This command can be excluded from the shell command set by |
---|
219 | defining @code{CONFIGURE_SHELL_NO_COMMAND_ID} when all |
---|
220 | shell commands have been configured. |
---|
221 | |
---|
222 | @subheading PROGRAMMING INFORMATION: |
---|
223 | |
---|
224 | @findex rtems_shell_rtems_main_id |
---|
225 | |
---|
226 | The @code{id} is implemented by a C language function |
---|
227 | which has the following prototype: |
---|
228 | |
---|
229 | @example |
---|
230 | int rtems_shell_rtems_main_id( |
---|
231 | int argc, |
---|
232 | char **argv |
---|
233 | ); |
---|
234 | @end example |
---|
235 | |
---|
236 | The configuration structure for the @code{id} has the |
---|
237 | following prototype: |
---|
238 | |
---|
239 | @example |
---|
240 | extern rtems_shell_cmd_t rtems_shell_ID_Command; |
---|
241 | @end example |
---|
242 | |
---|
243 | @c |
---|
244 | @c |
---|
245 | @c |
---|
246 | @page |
---|
247 | @subsection tty - show ttyname |
---|
248 | |
---|
249 | @pgindex tty |
---|
250 | |
---|
251 | @subheading SYNOPSYS: |
---|
252 | |
---|
253 | @example |
---|
254 | tty |
---|
255 | @end example |
---|
256 | |
---|
257 | @subheading DESCRIPTION: |
---|
258 | |
---|
259 | This command XXX |
---|
260 | |
---|
261 | @subheading EXIT STATUS: |
---|
262 | |
---|
263 | This command returns 0 on success and non-zero if an error is encountered. |
---|
264 | |
---|
265 | @subheading NOTES: |
---|
266 | |
---|
267 | NONE |
---|
268 | |
---|
269 | @subheading EXAMPLES: |
---|
270 | |
---|
271 | The following is an example of how to use @code{tty}: |
---|
272 | |
---|
273 | @example |
---|
274 | EXAMPLE_TBD |
---|
275 | @end example |
---|
276 | |
---|
277 | @subheading CONFIGURATION: |
---|
278 | |
---|
279 | @findex CONFIGURE_SHELL_NO_COMMAND_TTY |
---|
280 | @findex CONFIGURE_SHELL_COMMAND_TTY |
---|
281 | |
---|
282 | This command is included in the default shell command set. |
---|
283 | When building a custom command set, define |
---|
284 | @code{CONFIGURE_SHELL_COMMAND_TTY} to have this |
---|
285 | command included. |
---|
286 | |
---|
287 | This command can be excluded from the shell command set by |
---|
288 | defining @code{CONFIGURE_SHELL_NO_COMMAND_TTY} when all |
---|
289 | shell commands have been configured. |
---|
290 | |
---|
291 | @subheading PROGRAMMING INFORMATION: |
---|
292 | |
---|
293 | @findex rtems_shell_rtems_main_tty |
---|
294 | |
---|
295 | The @code{tty} is implemented by a C language function |
---|
296 | which has the following prototype: |
---|
297 | |
---|
298 | @example |
---|
299 | int rtems_shell_rtems_main_tty( |
---|
300 | int argc, |
---|
301 | char **argv |
---|
302 | ); |
---|
303 | @end example |
---|
304 | |
---|
305 | The configuration structure for the @code{tty} has the |
---|
306 | following prototype: |
---|
307 | |
---|
308 | @example |
---|
309 | extern rtems_shell_cmd_t rtems_shell_TTY_Command; |
---|
310 | @end example |
---|
311 | |
---|
312 | @c |
---|
313 | @c |
---|
314 | @c |
---|
315 | @page |
---|
316 | @subsection whoami - show current user |
---|
317 | |
---|
318 | @pgindex whoami |
---|
319 | |
---|
320 | @subheading SYNOPSYS: |
---|
321 | |
---|
322 | @example |
---|
323 | whoami |
---|
324 | @end example |
---|
325 | |
---|
326 | @subheading DESCRIPTION: |
---|
327 | |
---|
328 | This command XXX |
---|
329 | |
---|
330 | @subheading EXIT STATUS: |
---|
331 | |
---|
332 | This command returns 0 on success and non-zero if an error is encountered. |
---|
333 | |
---|
334 | @subheading NOTES: |
---|
335 | |
---|
336 | NONE |
---|
337 | |
---|
338 | @subheading EXAMPLES: |
---|
339 | |
---|
340 | The following is an example of how to use @code{whoami}: |
---|
341 | |
---|
342 | @example |
---|
343 | EXAMPLE_TBD |
---|
344 | @end example |
---|
345 | |
---|
346 | @subheading CONFIGURATION: |
---|
347 | |
---|
348 | @findex CONFIGURE_SHELL_NO_COMMAND_WHOAMI |
---|
349 | @findex CONFIGURE_SHELL_COMMAND_WHOAMI |
---|
350 | |
---|
351 | This command is included in the default shell command set. |
---|
352 | When building a custom command set, define |
---|
353 | @code{CONFIGURE_SHELL_COMMAND_WHOAMI} to have this |
---|
354 | command included. |
---|
355 | |
---|
356 | This command can be excluded from the shell command set by |
---|
357 | defining @code{CONFIGURE_SHELL_NO_COMMAND_WHOAMI} when all |
---|
358 | shell commands have been configured. |
---|
359 | |
---|
360 | @subheading PROGRAMMING INFORMATION: |
---|
361 | |
---|
362 | @findex rtems_shell_rtems_main_whoami |
---|
363 | |
---|
364 | The @code{whoami} is implemented by a C language function |
---|
365 | which has the following prototype: |
---|
366 | |
---|
367 | @example |
---|
368 | int rtems_shell_rtems_main_whoami( |
---|
369 | int argc, |
---|
370 | char **argv |
---|
371 | ); |
---|
372 | @end example |
---|
373 | |
---|
374 | The configuration structure for the @code{whoami} has the |
---|
375 | following prototype: |
---|
376 | |
---|
377 | @example |
---|
378 | extern rtems_shell_cmd_t rtems_shell_WHOAMI_Command; |
---|
379 | @end example |
---|
380 | |
---|
381 | @c |
---|
382 | @c |
---|
383 | @c |
---|
384 | @page |
---|
385 | @subsection logoff - logoff from the system |
---|
386 | |
---|
387 | @pgindex logoff |
---|
388 | |
---|
389 | @subheading SYNOPSYS: |
---|
390 | |
---|
391 | @example |
---|
392 | logoff |
---|
393 | @end example |
---|
394 | |
---|
395 | @subheading DESCRIPTION: |
---|
396 | |
---|
397 | This command XXX |
---|
398 | |
---|
399 | @subheading EXIT STATUS: |
---|
400 | |
---|
401 | This command returns 0 on success and non-zero if an error is encountered. |
---|
402 | |
---|
403 | @subheading NOTES: |
---|
404 | |
---|
405 | NONE |
---|
406 | |
---|
407 | @subheading EXAMPLES: |
---|
408 | |
---|
409 | The following is an example of how to use @code{logoff}: |
---|
410 | |
---|
411 | @example |
---|
412 | EXAMPLE_TBD |
---|
413 | @end example |
---|
414 | |
---|
415 | @subheading CONFIGURATION: |
---|
416 | |
---|
417 | @findex CONFIGURE_SHELL_NO_COMMAND_LOGOFF |
---|
418 | @findex CONFIGURE_SHELL_COMMAND_LOGOFF |
---|
419 | |
---|
420 | This command is included in the default shell command set. |
---|
421 | When building a custom command set, define |
---|
422 | @code{CONFIGURE_SHELL_COMMAND_LOGOFF} to have this |
---|
423 | command included. |
---|
424 | |
---|
425 | This command can be excluded from the shell command set by |
---|
426 | defining @code{CONFIGURE_SHELL_NO_COMMAND_LOGOFF} when all |
---|
427 | shell commands have been configured. |
---|
428 | |
---|
429 | @subheading PROGRAMMING INFORMATION: |
---|
430 | |
---|
431 | @findex rtems_shell_rtems_main_logoff |
---|
432 | |
---|
433 | The @code{logoff} is implemented by a C language function |
---|
434 | which has the following prototype: |
---|
435 | |
---|
436 | @example |
---|
437 | int rtems_shell_rtems_main_logoff( |
---|
438 | int argc, |
---|
439 | char **argv |
---|
440 | ); |
---|
441 | @end example |
---|
442 | |
---|
443 | The configuration structure for the @code{logoff} has the |
---|
444 | following prototype: |
---|
445 | |
---|
446 | @example |
---|
447 | extern rtems_shell_cmd_t rtems_shell_LOGOFF_Command; |
---|
448 | @end example |
---|
449 | |
---|
450 | @c |
---|
451 | @c |
---|
452 | @c |
---|
453 | @page |
---|
454 | @subsection exit - alias for logoff command |
---|
455 | |
---|
456 | @pgindex exit |
---|
457 | |
---|
458 | @subheading SYNOPSYS: |
---|
459 | |
---|
460 | @example |
---|
461 | exit |
---|
462 | @end example |
---|
463 | |
---|
464 | @subheading DESCRIPTION: |
---|
465 | |
---|
466 | This command XXX |
---|
467 | |
---|
468 | @subheading EXIT STATUS: |
---|
469 | |
---|
470 | This command returns 0 on success and non-zero if an error is encountered. |
---|
471 | |
---|
472 | @subheading NOTES: |
---|
473 | |
---|
474 | NONE |
---|
475 | |
---|
476 | @subheading EXAMPLES: |
---|
477 | |
---|
478 | The following is an example of how to use @code{exit}: |
---|
479 | |
---|
480 | @example |
---|
481 | EXAMPLE_TBD |
---|
482 | @end example |
---|
483 | |
---|
484 | @subheading CONFIGURATION: |
---|
485 | |
---|
486 | @findex CONFIGURE_SHELL_NO_COMMAND_EXIT |
---|
487 | @findex CONFIGURE_SHELL_COMMAND_EXIT |
---|
488 | |
---|
489 | This command is included in the default shell command set. |
---|
490 | When building a custom command set, define |
---|
491 | @code{CONFIGURE_SHELL_COMMAND_EXIT} to have this |
---|
492 | command included. |
---|
493 | |
---|
494 | This command can be excluded from the shell command set by |
---|
495 | defining @code{CONFIGURE_SHELL_NO_COMMAND_EXIT} when all |
---|
496 | shell commands have been configured. |
---|
497 | |
---|
498 | @subheading PROGRAMMING INFORMATION: |
---|
499 | |
---|
500 | @findex rtems_shell_rtems_main_exit |
---|
501 | |
---|
502 | The @code{exit} is implemented by a C language function |
---|
503 | which has the following prototype: |
---|
504 | |
---|
505 | @example |
---|
506 | int rtems_shell_rtems_main_exit( |
---|
507 | int argc, |
---|
508 | char **argv |
---|
509 | ); |
---|
510 | @end example |
---|
511 | |
---|
512 | The configuration structure for the @code{exit} has the |
---|
513 | following prototype: |
---|
514 | |
---|
515 | @example |
---|
516 | extern rtems_shell_cmd_t rtems_shell_EXIT_Command; |
---|
517 | @end example |
---|
518 | |
---|