source: rtems/doc/shell/general.t @ dc1c4308

4.104.114.95
Last change on this file since dc1c4308 was dc1c4308, checked in by Joel Sherrill <joel.sherrill@…>, on 02/21/08 at 23:56:30

2008-02-21 Joel Sherrill <joel.sherrill@…>

  • shell/file.t, shell/general.t, shell/memory.t, shell/network.t, shell/rtems.t: More descriptions and examples added.
  • Property mode set to 100644
File size: 9.3 KB
Line 
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
13The 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
40alias oldCommand newCommand
41@end example
42
43@subheading DESCRIPTION:
44
45This command adds an alternate name for an existing command to
46the command set.
47
48@subheading EXIT STATUS:
49
50This command returns 0 on success and non-zero if an error is encountered.
51
52@subheading NOTES:
53
54NONE
55
56@subheading EXAMPLES:
57
58The following is an example of how to use @code{alias}:
59
60@example
61SHLL [/] $ me
62shell:me command not found
63SHLL [/] $ alias whoami me
64SHLL [/] $ me
65rtems
66SHLL [/] $ whoami
67rtems
68@end example
69
70@subheading CONFIGURATION:
71
72@findex CONFIGURE_SHELL_NO_COMMAND_ALIAS
73@findex CONFIGURE_SHELL_COMMAND_ALIAS
74
75This command is included in the default shell command set. 
76When building a custom command set, define
77@code{CONFIGURE_SHELL_COMMAND_ALIAS} to have this
78command included.
79
80This command can be excluded from the shell command set by
81defining @code{CONFIGURE_SHELL_NO_COMMAND_ALIAS} when all
82shell commands have been configured.
83
84@subheading PROGRAMMING INFORMATION:
85
86@findex rtems_shell_rtems_main_alias
87
88The @code{alias} is implemented by a C language function
89which has the following prototype:
90
91@example
92int rtems_shell_rtems_main_alias(
93  int    argc,
94  char **argv
95);
96@end example
97
98The configuration structure for the @code{alias} has the
99following prototype:
100
101@example
102extern 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
116date
117@end example
118
119@subheading DESCRIPTION:
120
121This command XXX
122
123@subheading EXIT STATUS:
124
125This command returns 0 on success and non-zero if an error is encountered.
126
127@subheading NOTES:
128
129NONE
130
131@subheading EXAMPLES:
132
133The following is an example of how to use @code{date}:
134
135@example
136EXAMPLE_TBD
137@end example
138
139@subheading CONFIGURATION:
140
141@findex CONFIGURE_SHELL_NO_COMMAND_DATE
142@findex CONFIGURE_SHELL_COMMAND_DATE
143
144This command is included in the default shell command set. 
145When building a custom command set, define
146@code{CONFIGURE_SHELL_COMMAND_DATE} to have this
147command included.
148
149This command can be excluded from the shell command set by
150defining @code{CONFIGURE_SHELL_NO_COMMAND_DATE} when all
151shell commands have been configured.
152
153@subheading PROGRAMMING INFORMATION:
154
155@findex rtems_shell_rtems_main_date
156
157The @code{date} is implemented by a C language function
158which has the following prototype:
159
160@example
161int rtems_shell_rtems_main_date(
162  int    argc,
163  char **argv
164);
165@end example
166
167The configuration structure for the @code{date} has the
168following prototype:
169
170@example
171extern 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
185id
186@end example
187
188@subheading DESCRIPTION:
189
190This command XXX
191
192@subheading EXIT STATUS:
193
194This command returns 0 on success and non-zero if an error is encountered.
195
196@subheading NOTES:
197
198NONE
199
200@subheading EXAMPLES:
201
202The following is an example of how to use @code{id}:
203
204@example
205EXAMPLE_TBD
206@end example
207
208@subheading CONFIGURATION:
209
210@findex CONFIGURE_SHELL_NO_COMMAND_ID
211@findex CONFIGURE_SHELL_COMMAND_ID
212
213This command is included in the default shell command set. 
214When building a custom command set, define
215@code{CONFIGURE_SHELL_COMMAND_ID} to have this
216command included.
217
218This command can be excluded from the shell command set by
219defining @code{CONFIGURE_SHELL_NO_COMMAND_ID} when all
220shell commands have been configured.
221
222@subheading PROGRAMMING INFORMATION:
223
224@findex rtems_shell_rtems_main_id
225
226The @code{id} is implemented by a C language function
227which has the following prototype:
228
229@example
230int rtems_shell_rtems_main_id(
231  int    argc,
232  char **argv
233);
234@end example
235
236The configuration structure for the @code{id} has the
237following prototype:
238
239@example
240extern 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
254tty
255@end example
256
257@subheading DESCRIPTION:
258
259This command XXX
260
261@subheading EXIT STATUS:
262
263This command returns 0 on success and non-zero if an error is encountered.
264
265@subheading NOTES:
266
267NONE
268
269@subheading EXAMPLES:
270
271The following is an example of how to use @code{tty}:
272
273@example
274EXAMPLE_TBD
275@end example
276
277@subheading CONFIGURATION:
278
279@findex CONFIGURE_SHELL_NO_COMMAND_TTY
280@findex CONFIGURE_SHELL_COMMAND_TTY
281
282This command is included in the default shell command set. 
283When building a custom command set, define
284@code{CONFIGURE_SHELL_COMMAND_TTY} to have this
285command included.
286
287This command can be excluded from the shell command set by
288defining @code{CONFIGURE_SHELL_NO_COMMAND_TTY} when all
289shell commands have been configured.
290
291@subheading PROGRAMMING INFORMATION:
292
293@findex rtems_shell_rtems_main_tty
294
295The @code{tty} is implemented by a C language function
296which has the following prototype:
297
298@example
299int rtems_shell_rtems_main_tty(
300  int    argc,
301  char **argv
302);
303@end example
304
305The configuration structure for the @code{tty} has the
306following prototype:
307
308@example
309extern 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
323whoami
324@end example
325
326@subheading DESCRIPTION:
327
328This command XXX
329
330@subheading EXIT STATUS:
331
332This command returns 0 on success and non-zero if an error is encountered.
333
334@subheading NOTES:
335
336NONE
337
338@subheading EXAMPLES:
339
340The following is an example of how to use @code{whoami}:
341
342@example
343EXAMPLE_TBD
344@end example
345
346@subheading CONFIGURATION:
347
348@findex CONFIGURE_SHELL_NO_COMMAND_WHOAMI
349@findex CONFIGURE_SHELL_COMMAND_WHOAMI
350
351This command is included in the default shell command set. 
352When building a custom command set, define
353@code{CONFIGURE_SHELL_COMMAND_WHOAMI} to have this
354command included.
355
356This command can be excluded from the shell command set by
357defining @code{CONFIGURE_SHELL_NO_COMMAND_WHOAMI} when all
358shell commands have been configured.
359
360@subheading PROGRAMMING INFORMATION:
361
362@findex rtems_shell_rtems_main_whoami
363
364The @code{whoami} is implemented by a C language function
365which has the following prototype:
366
367@example
368int rtems_shell_rtems_main_whoami(
369  int    argc,
370  char **argv
371);
372@end example
373
374The configuration structure for the @code{whoami} has the
375following prototype:
376
377@example
378extern 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
392logoff
393@end example
394
395@subheading DESCRIPTION:
396
397This command XXX
398
399@subheading EXIT STATUS:
400
401This command returns 0 on success and non-zero if an error is encountered.
402
403@subheading NOTES:
404
405NONE
406
407@subheading EXAMPLES:
408
409The following is an example of how to use @code{logoff}:
410
411@example
412EXAMPLE_TBD
413@end example
414
415@subheading CONFIGURATION:
416
417@findex CONFIGURE_SHELL_NO_COMMAND_LOGOFF
418@findex CONFIGURE_SHELL_COMMAND_LOGOFF
419
420This command is included in the default shell command set. 
421When building a custom command set, define
422@code{CONFIGURE_SHELL_COMMAND_LOGOFF} to have this
423command included.
424
425This command can be excluded from the shell command set by
426defining @code{CONFIGURE_SHELL_NO_COMMAND_LOGOFF} when all
427shell commands have been configured.
428
429@subheading PROGRAMMING INFORMATION:
430
431@findex rtems_shell_rtems_main_logoff
432
433The @code{logoff} is implemented by a C language function
434which has the following prototype:
435
436@example
437int rtems_shell_rtems_main_logoff(
438  int    argc,
439  char **argv
440);
441@end example
442
443The configuration structure for the @code{logoff} has the
444following prototype:
445
446@example
447extern 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
461exit
462@end example
463
464@subheading DESCRIPTION:
465
466This command XXX
467
468@subheading EXIT STATUS:
469
470This command returns 0 on success and non-zero if an error is encountered.
471
472@subheading NOTES:
473
474NONE
475
476@subheading EXAMPLES:
477
478The following is an example of how to use @code{exit}:
479
480@example
481EXAMPLE_TBD
482@end example
483
484@subheading CONFIGURATION:
485
486@findex CONFIGURE_SHELL_NO_COMMAND_EXIT
487@findex CONFIGURE_SHELL_COMMAND_EXIT
488
489This command is included in the default shell command set. 
490When building a custom command set, define
491@code{CONFIGURE_SHELL_COMMAND_EXIT} to have this
492command included.
493
494This command can be excluded from the shell command set by
495defining @code{CONFIGURE_SHELL_NO_COMMAND_EXIT} when all
496shell commands have been configured.
497
498@subheading PROGRAMMING INFORMATION:
499
500@findex rtems_shell_rtems_main_exit
501
502The @code{exit} is implemented by a C language function
503which has the following prototype:
504
505@example
506int rtems_shell_rtems_main_exit(
507  int    argc,
508  char **argv
509);
510@end example
511
512The configuration structure for the @code{exit} has the
513following prototype:
514
515@example
516extern rtems_shell_cmd_t rtems_shell_EXIT_Command;
517@end example
518
Note: See TracBrowser for help on using the repository browser.