Changeset a6b837e in rtems-docs


Ignore:
Timestamp:
Jan 17, 2016, 3:40:03 AM (4 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
499c09f
Parents:
3c29186
git-author:
Chris Johns <chrisj@…> (01/17/16 03:40:03)
git-committer:
Amar Takhar <verm@…> (05/03/16 00:51:23)
Message:

Clean up of general commands.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shell/general_commands.rst

    r3c29186 ra6b837e  
    5656**SYNOPSYS:**
    5757
    58 .. code:: c
     58.. code:: shell
    5959
    6060    help misc
     
    8080The following is an example of how to use ``alias``:
    8181
    82 .. code-block:: shell
     82.. code:: shell
    8383
    8484    SHLL [/] $ help
     
    133133**SYNOPSYS:**
    134134
    135 .. code:: c
     135.. code:: shell
    136136
    137137    alias oldCommand newCommand
     
    147147**NOTES:**
    148148
    149 NONE
     149None.
    150150
    151151**EXAMPLES:**
    152152
    153153The following is an example of how to use ``alias``:
    154 .. code:: c
    155 
    156     SHLL \[/] $ me
     154
     155.. code:: shell
     156
     157    SHLL [/] $ me
    157158    shell:me command not found
    158     SHLL \[/] $ alias whoami me
    159     SHLL \[/] $ me
     159    SHLL [/] $ alias whoami me
     160    SHLL [/] $ me
    160161    rtems
    161     SHLL \[/] $ whoami
     162    SHLL [/] $ whoami
    162163    rtems
    163164
     
    167168.. index:: CONFIGURE_SHELL_COMMAND_ALIAS
    168169
    169 This command is included in the default shell command set.
    170 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_ALIAS`` to have this
     170This command is included in the default shell command set.  When building a
     171custom command set, define ``CONFIGURE_SHELL_COMMAND_ALIAS`` to have this
    171172command included.
    172173
    173 This command can be excluded from the shell command set by
    174 defining ``CONFIGURE_SHELL_NO_COMMAND_ALIAS`` when all
    175 shell commands have been configured.
     174This command can be excluded from the shell command set by defining
     175``CONFIGURE_SHELL_NO_COMMAND_ALIAS`` when all shell commands have been
     176configured.
    176177
    177178**PROGRAMMING INFORMATION:**
     
    179180.. index:: rtems_shell_rtems_main_alias
    180181
    181 The ``alias`` is implemented by a C language function
    182 which has the following prototype:
     182The ``alias`` is implemented by a C language function which has the following
     183prototype:
     184
    183185.. code:: c
    184186
    185187    int rtems_shell_rtems_main_alias(
    186     int    argc,
    187     char \**argv
     188        int    argc,
     189        char **argv
    188190    );
    189191
    190 The configuration structure for the ``alias`` has the
    191 following prototype:
     192The configuration structure for the ``alias`` has the following prototype:
     193
    192194.. code:: c
    193195
     
    200202**SYNOPSYS:**
    201203
    202 .. code:: c
     204.. code:: shell
    203205
    204206    cmdls COMMAND...
     
    219221
    220222The following is an example of how to use ``cmdls``:
    221 .. code:: c
    222 
    223     SHLL \[/] # cmdls help shutdown
     223
     224.. code:: shell
     225
     226    SHLL [/] # cmdls help shutdown
    224227    r-xr-xr-x     0     0 help
    225228    r-x------     0     0 shutdown
     
    230233.. index:: CONFIGURE_SHELL_COMMAND_CMDLS
    231234
    232 This command is included in the default shell command set.
    233 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_CMDLS`` to have this
     235This command is included in the default shell command set.  When building a
     236custom command set, define ``CONFIGURE_SHELL_COMMAND_CMDLS`` to have this
    234237command included.
    235238
    236 This command can be excluded from the shell command set by
    237 defining ``CONFIGURE_SHELL_NO_COMMAND_CMDLS`` when all
    238 shell commands have been configured.
    239 
    240 **PROGRAMMING INFORMATION:**
    241 
    242 The configuration structure for the ``cmdls`` has the
    243 following prototype:
     239This command can be excluded from the shell command set by defining
     240``CONFIGURE_SHELL_NO_COMMAND_CMDLS`` when all shell commands have been
     241configured.
     242
     243**PROGRAMMING INFORMATION:**
     244
     245The configuration structure for the ``cmdls`` has the following prototype:
     246
    244247.. code:: c
    245248
     
    252255**SYNOPSYS:**
    253256
    254 .. code:: c
    255 
    256     cmdchown \[OWNER][:\[GROUP]] COMMAND...
     257.. code:: shell
     258
     259    cmdchown [OWNER][:[GROUP]] COMMAND...
    257260
    258261**DESCRIPTION:**
     
    272275
    273276The following is an example of how to use ``cmdchown``:
    274 .. code:: c
     277
     278.. code:: shell
    275279
    276280    [/] # cmdls help
    277281    r-xr-xr-x     0     0 help
    278     \[/] # cmdchown 1:1 help
    279     \[/] # cmdls help
     282    [/] # cmdchown 1:1 help
     283    [/] # cmdls help
    280284    r--r--r--     1     1 help
    281285
     
    285289.. index:: CONFIGURE_SHELL_COMMAND_CMDCHOWN
    286290
    287 This command is included in the default shell command set.
    288 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_CMDCHOWN`` to have this
     291This command is included in the default shell command set.  When building a
     292custom command set, define ``CONFIGURE_SHELL_COMMAND_CMDCHOWN`` to have this
    289293command included.
    290294
    291 This command can be excluded from the shell command set by
    292 defining ``CONFIGURE_SHELL_NO_COMMAND_CMDCHOWN`` when all
    293 shell commands have been configured.
    294 
    295 **PROGRAMMING INFORMATION:**
    296 
    297 The configuration structure for the ``cmdchown`` has the
    298 following prototype:
     295This command can be excluded from the shell command set by defining
     296``CONFIGURE_SHELL_NO_COMMAND_CMDCHOWN`` when all shell commands have been
     297configured.
     298
     299**PROGRAMMING INFORMATION:**
     300
     301The configuration structure for the ``cmdchown`` has the following prototype:
     302
    299303.. code:: c
    300304
     
    307311**SYNOPSYS:**
    308312
    309 .. code:: c
     313.. code:: shell
    310314
    311315    cmdchmod OCTAL-MODE COMMAND...
     
    327331
    328332The following is an example of how to use ``cmdchmod``:
    329 .. code:: c
     333
     334.. code:: shell
    330335
    331336    [/] # cmdls help
    332337    r-xr-xr-x     0     0 help
    333     \[/] # cmdchmod 544 help
    334     \[/] # cmdls help
     338    [/] # cmdchmod 544 help
     339    [/] # cmdls help
    335340    r-xr--r--     0     0 help
    336341
     
    340345.. index:: CONFIGURE_SHELL_COMMAND_CMDCHMOD
    341346
    342 This command is included in the default shell command set.
    343 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_CMDCHMOD`` to have this
     347This command is included in the default shell command set.  When building a
     348custom command set, define ``CONFIGURE_SHELL_COMMAND_CMDCHMOD`` to have this
    344349command included.
    345350
    346 This command can be excluded from the shell command set by
    347 defining ``CONFIGURE_SHELL_NO_COMMAND_CMDCHMOD`` when all
    348 shell commands have been configured.
    349 
    350 **PROGRAMMING INFORMATION:**
    351 
    352 The configuration structure for the ``cmdchmod`` has the
    353 following prototype:
     351This command can be excluded from the shell command set by defining
     352``CONFIGURE_SHELL_NO_COMMAND_CMDCHMOD`` when all shell commands have been
     353configured.
     354
     355**PROGRAMMING INFORMATION:**
     356
     357The configuration structure for the ``cmdchmod`` has the following prototype:
     358
    354359.. code:: c
    355360
     
    362367**SYNOPSYS:**
    363368
    364 .. code:: c
     369.. code:: shell
    365370
    366371    date
     
    369374**DESCRIPTION:**
    370375
    371 This command operates one of two modes.  When invoked with no
    372 arguments, it prints the current date and time.  When invoked
    373 with both ``date`` and ``time`` arguments, it sets the
    374 current time.
     376This command operates one of two modes.  When invoked with no arguments, it
     377prints the current date and time.  When invoked with both ``date`` and ``time``
     378arguments, it sets the current time.
    375379
    376380The ``date`` is specified in ``YYYY-MM-DD`` format.
     
    383387**NOTES:**
    384388
    385 This comm
     389None.
    386390
    387391**EXAMPLES:**
    388392
    389393The following is an example of how to use ``date``:
    390 .. code:: c
    391 
    392     SHLL \[/] $ date
     394
     395.. code:: shell
     396
     397    SHLL [/] $ date
    393398    Fri Jan  1 00:00:09 1988
    394     SHLL \[/] $ date 2008-02-29 06:45:32
    395     SHLL \[/] $ date
     399    SHLL [/] $ date 2008-02-29 06:45:32
     400    SHLL [/] $ date
    396401    Fri Feb 29 06:45:35 2008
    397402
     
    401406.. index:: CONFIGURE_SHELL_COMMAND_DATE
    402407
    403 This command is included in the default shell command set.
    404 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_DATE`` to have this
    405 command included.
    406 
    407 This command can be excluded from the shell command set by
    408 defining ``CONFIGURE_SHELL_NO_COMMAND_DATE`` when all
    409 shell commands have been configured.
     408This command is included in the default shell command set.  When building a
     409custom command set, define ``CONFIGURE_SHELL_COMMAND_DATE`` to have this command
     410included.
     411
     412This command can be excluded from the shell command set by defining
     413``CONFIGURE_SHELL_NO_COMMAND_DATE`` when all shell commands have been
     414configured.
    410415
    411416**PROGRAMMING INFORMATION:**
     
    413418.. index:: rtems_shell_rtems_main_date
    414419
    415 The ``date`` is implemented by a C language function
    416 which has the following prototype:
     420The ``date`` is implemented by a C language function which has the following
     421prototype:
     422
    417423.. code:: c
    418424
    419425    int rtems_shell_rtems_main_date(
    420     int    argc,
    421     char \**argv
     426        int    argc,
     427        char **argv
    422428    );
    423429
    424 The configuration structure for the ``date`` has the
    425 following prototype:
     430The configuration structure for the ``date`` has the following prototype:
     431
    426432.. code:: c
    427433
     
    434440**SYNOPSYS:**
    435441
    436 .. code:: c
    437 
    438     echo \[-n | -e] args ...
    439 
    440 **DESCRIPTION:**
    441 
    442 echo prints its arguments on the standard output, separated by spaces.
    443 Unless the *-n* option is present, a newline is output following the
    444 arguments.  The *-e* option causes echo to treat the escape sequences
    445 specially, as described in the following paragraph.  The *-e* option is the
    446 default, and is provided solely for compatibility with other systems.
    447 Only one of the options *-n* and *-e* may be given.
    448 
    449 If any of the following sequences of characters is encountered during
    450 output, the sequence is not output.  Instead, the specified action is
    451 performed:
     442.. code:: shell
     443
     444    echo [-n | -e] args ...
     445
     446**DESCRIPTION:**
     447
     448Echo prints its arguments on the standard output, separated by spaces.  Unless
     449the *-n* option is present, a newline is output following the arguments.  The
     450*-e* option causes echo to treat the escape sequences specially, as described
     451in the following paragraph.  The *-e* option is the default, and is provided
     452solely for compatibility with other systems.  Only one of the options *-n* and
     453*-e* may be given.
     454
     455If any of the following sequences of characters is encountered during output,
     456the sequence is not output.  Instead, the specified action is performed:
    452457
    453458*\\b*
     
    455460
    456461*\\c*
    457     Subsequent output is suppressed.  This is normally used at the
    458     end of the last argument to suppress the trailing newline that
    459     echo would otherwise output.
     462    Subsequent output is suppressed.  This is normally used at the end of the
     463    last argument to suppress the trailing newline that echo would otherwise
     464    output.
    460465
    461466*\\f*
     
    475480
    476481*\\0digits*
    477     Output the character whose value is given by zero to three digits.
    478     If there are zero digits, a nul character is output.
     482    Output the character whose value is given by zero to three digits.  If
     483    there are zero digits, a nul character is output.
    479484
    480485*\\\\*
     
    487492**NOTES:**
    488493
    489 The octal character escape mechanism (\\0digits) differs from the C lan-
    490 guage mechanism.
    491 
    492 There is no way to force ``echo`` to treat its arguments literally, rather
    493 than interpreting them as options and escape sequences.
     494The octal character escape mechanism (\\0digits) differs from the C language
     495mechanism.
     496
     497There is no way to force ``echo`` to treat its arguments literally, rather than
     498interpreting them as options and escape sequences.
    494499
    495500**EXAMPLES:**
    496501
    497502The following is an example of how to use ``echo``:
    498 .. code:: c
    499 
    500     SHLL \[/] $ echo a b c
     503
     504.. code:: shell
     505
     506    SHLL [/] $ echo a b c
    501507    a b c
    502     SHLL \[/] $ echo
     508    SHLL [/] $ echo
    503509
    504510**CONFIGURATION:**
     
    507513.. index:: CONFIGURE_SHELL_COMMAND_ECHO
    508514
    509 This command is included in the default shell command set.
    510 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_ECHO`` to have this
    511 command included.
    512 
    513 This command can be excluded from the shell command set by
    514 defining ``CONFIGURE_SHELL_NO_COMMAND_ECHO`` when all
    515 shell commands have been configured.
     515This command is included in the default shell command set.  When building a
     516custom command set, define ``CONFIGURE_SHELL_COMMAND_ECHO`` to have this command
     517included.
     518
     519This command can be excluded from the shell command set by defining
     520``CONFIGURE_SHELL_NO_COMMAND_ECHO`` when all shell commands have been
     521configured.
    516522
    517523**PROGRAMMING INFORMATION:**
     
    519525.. index:: rtems_shell_rtems_main_echo
    520526
    521 The ``echo`` is implemented by a C language function
    522 which has the following prototype:
     527The ``echo`` is implemented by a C language function which has the following
     528prototype:
     529
    523530.. code:: c
    524531
    525532    int rtems_shell_rtems_main_echo(
    526     int    argc,
    527     char \**argv
     533        int    argc,
     534        char **argv
    528535    );
    529536
    530 The configuration structure for the ``echo`` has the
    531 following prototype:
     537The configuration structure for the ``echo`` has the following prototype:
     538
    532539.. code:: c
    533540
     
    536543**ORIGIN:**
    537544
    538 The implementation and portions of the documentation for this
    539 command are from NetBSD 4.0.
     545The implementation and portions of the documentation for this command are from
     546NetBSD 4.0.
    540547
    541548sleep - delay for a specified amount of time
     
    545552**SYNOPSYS:**
    546553
    547 .. code:: c
     554.. code:: shell
    548555
    549556    sleep seconds
     
    552559**DESCRIPTION:**
    553560
    554 This command causes the task executing the shell to block
    555 for the specified number of ``seconds`` and ``nanoseconds``.
     561This command causes the task executing the shell to block for the specified
     562number of ``seconds`` and ``nanoseconds``.
    556563
    557564**EXIT STATUS:**
     
    563570This command is implemented using the ``nanosleep()`` method.
    564571
    565 The command line interface is similar to the ``sleep`` command
    566 found on POSIX systems but the addition of the ``nanoseconds``
    567 parameter allows fine grained delays in shell scripts without
    568 adding another command such as ``usleep``.
     572The command line interface is similar to the ``sleep`` command found on POSIX
     573systems but the addition of the ``nanoseconds`` parameter allows fine grained
     574delays in shell scripts without adding another command such as ``usleep``.
    569575
    570576**EXAMPLES:**
    571577
    572578The following is an example of how to use ``sleep``:
    573 .. code:: c
    574 
    575     SHLL \[/] $ sleep 10
    576     SHLL \[/] $ sleep 0 5000000
    577 
    578 It is not clear from the above but there is a ten second
    579 pause after executing the first command before the prompt
    580 is printed.  The second command completes very quickly
    581 from a human perspective and there is no noticeable
    582 delay in the prompt being printed.
     579
     580.. code:: shell
     581
     582    SHLL [/] $ sleep 10
     583    SHLL [/] $ sleep 0 5000000
     584
     585It is not clear from the above but there is a ten second pause after executing
     586the first command before the prompt is printed.  The second command completes
     587very quickly from a human perspective and there is no noticeable delay in the
     588prompt being printed.
    583589
    584590**CONFIGURATION:**
     
    587593.. index:: CONFIGURE_SHELL_COMMAND_SLEEP
    588594
    589 This command is included in the default shell command set.
    590 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_SLEEP`` to have this
     595This command is included in the default shell command set.  When building a
     596custom command set, define ``CONFIGURE_SHELL_COMMAND_SLEEP`` to have this
    591597command included.
    592598
    593 This command can be excluded from the shell command set by
    594 defining ``CONFIGURE_SHELL_NO_COMMAND_SLEEP`` when all
    595 shell commands have been configured.
     599This command can be excluded from the shell command set by defining
     600``CONFIGURE_SHELL_NO_COMMAND_SLEEP`` when all shell commands have been
     601configured.
    596602
    597603**PROGRAMMING INFORMATION:**
     
    599605.. index:: rtems_shell_rtems_main_sleep
    600606
    601 The ``sleep`` is implemented by a C language function
    602 which has the following prototype:
     607The ``sleep`` is implemented by a C language function which has the following
     608prototype:
     609
    603610.. code:: c
    604611
    605612    int rtems_shell_rtems_main_sleep(
    606     int    argc,
    607     char \**argv
     613        int    argc,
     614        char **argv
    608615    );
    609616
    610 The configuration structure for the ``sleep`` has the
    611 following prototype:
     617The configuration structure for the ``sleep`` has the following prototype:
     618
    612619.. code:: c
    613620
     
    620627**SYNOPSYS:**
    621628
    622 .. code:: c
     629.. code:: shell
    623630
    624631    id
     
    626633**DESCRIPTION:**
    627634
    628 This command prints the user identity.  This includes the user id
    629 (uid), group id (gid), effective user id (euid), and effective
    630 group id (egid).
     635This command prints the user identity.  This includes the user id (uid), group
     636id (gid), effective user id (euid), and effective group id (egid).
    631637
    632638**EXIT STATUS:**
     
    637643
    638644Remember there is only one POSIX process in a single processor RTEMS
    639 application. Each thread may have its own user identity and that
    640 identity is used by the filesystem to enforce permissions.
     645application. Each thread may have its own user identity and that identity is
     646used by the filesystem to enforce permissions.
    641647
    642648**EXAMPLES:**
     
    644650The first example of the ``id`` command is from a session logged
    645651in as the normal user ``rtems``:
    646 .. code:: c
    647 
    648     SHLL \[/] # id
     652
     653.. code:: shell
     654
     655    SHLL [/] # id
    649656    uid=1(rtems),gid=1(rtems),euid=1(rtems),egid=1(rtems)
    650657
    651 The second example of the ``id`` command is from a session logged
    652 in as the ``root`` user:
    653 .. code:: c
    654 
    655     SHLL \[/] # id
     658The second example of the ``id`` command is from a session logged in as the
     659``root`` user:
     660
     661.. code:: shell
     662
     663    SHLL [/] # id
    656664    uid=0(root),gid=0(root),euid=0(root),egid=0(root)
    657665
     
    661669.. index:: CONFIGURE_SHELL_COMMAND_ID
    662670
    663 This command is included in the default shell command set.
    664 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_ID`` to have this
    665 command included.
    666 
    667 This command can be excluded from the shell command set by
    668 defining ``CONFIGURE_SHELL_NO_COMMAND_ID`` when all
    669 shell commands have been configured.
     671This command is included in the default shell command set.  When building a
     672custom command set, define ``CONFIGURE_SHELL_COMMAND_ID`` to have this command
     673included.
     674
     675This command can be excluded from the shell command set by defining
     676``CONFIGURE_SHELL_NO_COMMAND_ID`` when all shell commands have been configured.
    670677
    671678**PROGRAMMING INFORMATION:**
     
    673680.. index:: rtems_shell_rtems_main_id
    674681
    675 The ``id`` is implemented by a C language function
    676 which has the following prototype:
     682The ``id`` is implemented by a C language function which has the following
     683prototype:
     684
    677685.. code:: c
    678686
    679687    int rtems_shell_rtems_main_id(
    680     int    argc,
    681     char \**argv
     688        int    argc,
     689        char **argv
    682690    );
    683691
    684 The configuration structure for the ``id`` has the
    685 following prototype:
     692The configuration structure for the ``id`` has the following prototype:
     693
    686694.. code:: c
    687695
     
    694702**SYNOPSYS:**
    695703
    696 .. code:: c
     704.. code:: shell
    697705
    698706    tty
     
    700708**DESCRIPTION:**
    701709
    702 This command prints the file name of the device connected
    703 to standard input.
     710This command prints the file name of the device connected to standard input.
    704711
    705712**EXIT STATUS:**
     
    714721
    715722The following is an example of how to use ``tty``:
    716 .. code:: c
    717 
    718     SHLL \[/] $ tty
     723
     724.. code:: shell
     725
     726    SHLL [/] $ tty
    719727    /dev/console
    720728
     
    724732.. index:: CONFIGURE_SHELL_COMMAND_TTY
    725733
    726 This command is included in the default shell command set.
    727 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_TTY`` to have this
    728 command included.
    729 
    730 This command can be excluded from the shell command set by
    731 defining ``CONFIGURE_SHELL_NO_COMMAND_TTY`` when all
    732 shell commands have been configured.
     734This command is included in the default shell command set.  When building a
     735custom command set, define ``CONFIGURE_SHELL_COMMAND_TTY`` to have this command
     736included.
     737
     738This command can be excluded from the shell command set by defining
     739``CONFIGURE_SHELL_NO_COMMAND_TTY`` when all shell commands have been
     740configured.
    733741
    734742**PROGRAMMING INFORMATION:**
     
    736744.. index:: rtems_shell_rtems_main_tty
    737745
    738 The ``tty`` is implemented by a C language function
    739 which has the following prototype:
     746The ``tty`` is implemented by a C language function which has the following
     747prototype:
     748
    740749.. code:: c
    741750
    742751    int rtems_shell_rtems_main_tty(
    743     int    argc,
    744     char \**argv
     752        int    argc,
     753        char **argv
    745754    );
    746755
    747 The configuration structure for the ``tty`` has the
    748 following prototype:
     756The configuration structure for the ``tty`` has the following prototype:
     757
    749758.. code:: c
    750759
     
    757766**SYNOPSYS:**
    758767
    759 .. code:: c
     768.. code:: shell
    760769
    761770    whoami
     
    763772**DESCRIPTION:**
    764773
    765 This command displays the user name associated with the current
    766 effective user id.
     774This command displays the user name associated with the current effective user
     775id.
    767776
    768777**EXIT STATUS:**
     
    772781**NOTES:**
    773782
    774 NONE
     783None.
    775784
    776785**EXAMPLES:**
    777786
    778787The following is an example of how to use ``whoami``:
    779 .. code:: c
    780 
    781     SHLL \[/] $ whoami
     788
     789.. code:: shell
     790
     791    SHLL [/] $ whoami
    782792    rtems
    783793
     
    787797.. index:: CONFIGURE_SHELL_COMMAND_WHOAMI
    788798
    789 This command is included in the default shell command set.
    790 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_WHOAMI`` to have this
     799This command is included in the default shell command set.  When building a
     800custom command set, define ``CONFIGURE_SHELL_COMMAND_WHOAMI`` to have this
    791801command included.
    792802
    793 This command can be excluded from the shell command set by
    794 defining ``CONFIGURE_SHELL_NO_COMMAND_WHOAMI`` when all
    795 shell commands have been configured.
     803This command can be excluded from the shell command set by defining
     804``CONFIGURE_SHELL_NO_COMMAND_WHOAMI`` when all shell commands have been
     805configured.
    796806
    797807**PROGRAMMING INFORMATION:**
     
    799809.. index:: rtems_shell_rtems_main_whoami
    800810
    801 The ``whoami`` is implemented by a C language function
    802 which has the following prototype:
     811The ``whoami`` is implemented by a C language function which has the following
     812prototype:
     813
    803814.. code:: c
    804815
    805816    int rtems_shell_rtems_main_whoami(
    806     int    argc,
    807     char \**argv
     817        int    argc,
     818        char **argv
    808819    );
    809820
    810 The configuration structure for the ``whoami`` has the
    811 following prototype:
     821The configuration structure for the ``whoami`` has the following prototype:
     822
    812823.. code:: c
    813824
     
    820831**SYNOPSYS:**
    821832
    822 .. code:: c
     833.. code:: shell
    823834
    824835    getenv variable
     
    826837**DESCRIPTION:**
    827838
    828 This command is used to display the value of a ``variable`` in the set
    829 of environment variables.
    830 
    831 **EXIT STATUS:**
    832 
    833 This command will return 1 and print a diagnostic message if
    834 a failure occurs.
     839This command is used to display the value of a ``variable`` in the set of
     840environment variables.
     841
     842**EXIT STATUS:**
     843
     844This command will return 1 and print a diagnostic message if a failure occurs.
    835845
    836846**NOTES:**
     
    841851
    842852The following is an example of how to use ``getenv``:
    843 .. code:: c
    844 
    845     SHLL \[/] $ getenv BASEPATH
     853
     854.. code:: shell
     855
     856    SHLL [/] $ getenv BASEPATH
    846857    /mnt/hda1
    847858
     
    851862.. index:: CONFIGURE_SHELL_COMMAND_GETENV
    852863
    853 This command is included in the default shell command set.
    854 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_GETENV`` to have this
     864This command is included in the default shell command set.  When building a
     865custom command set, define ``CONFIGURE_SHELL_COMMAND_GETENV`` to have this
    855866command included.
    856867
    857 This command can be excluded from the shell command set by
    858 defining ``CONFIGURE_SHELL_NO_COMMAND_GETENV`` when all
    859 shell commands have been configured.
     868This command can be excluded from the shell command set by defining
     869``CONFIGURE_SHELL_NO_COMMAND_GETENV`` when all shell commands have been
     870configured.
    860871
    861872**PROGRAMMING INFORMATION:**
     
    863874.. index:: rtems_shell_rtems_main_getenv
    864875
    865 The ``getenv`` is implemented by a C language function
    866 which has the following prototype:
     876The ``getenv`` is implemented by a C language function which has the following
     877prototype:
     878
    867879.. code:: c
    868880
    869881    int rtems_shell_rtems_main_getenv(
    870     int    argc,
    871     char \**argv
     882        int    argc,
     883        char **argv
    872884    );
    873885
    874 The configuration structure for the ``getenv`` has the
    875 following prototype:
     886The configuration structure for the ``getenv`` has the following prototype:
     887
    876888.. code:: c
    877889
     
    884896**SYNOPSYS:**
    885897
    886 .. code:: c
    887 
    888     setenv variable \[value]
     898.. code:: shell
     899
     900    setenv variable [value]
    889901
    890902**DESCRIPTION:**
    891903
    892904This command is used to add a new ``variable`` to the set of environment
    893 variables or to modify the variable of an already existing ``variable``.
    894 If the ``value`` is not provided, the ``variable`` will be set to the
    895 empty string.
    896 
    897 **EXIT STATUS:**
    898 
    899 This command will return 1 and print a diagnostic message if
    900 a failure occurs.
     905variables or to modify the variable of an already existing ``variable``.  If
     906the ``value`` is not provided, the ``variable`` will be set to the empty
     907string.
     908
     909**EXIT STATUS:**
     910
     911This command will return 1 and print a diagnostic message if a failure occurs.
    901912
    902913**NOTES:**
     
    907918
    908919The following is an example of how to use ``setenv``:
    909 .. code:: c
    910 
    911     SHLL \[/] $ setenv BASEPATH /mnt/hda1
     920
     921.. code:: shell
     922
     923    SHLL [/] $ setenv BASEPATH /mnt/hda1
    912924
    913925**CONFIGURATION:**
     
    916928.. index:: CONFIGURE_SHELL_COMMAND_SETENV
    917929
    918 This command is included in the default shell command set.
    919 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_SETENV`` to have this
     930This command is included in the default shell command set.  When building a
     931custom command set, define ``CONFIGURE_SHELL_COMMAND_SETENV`` to have this
    920932command included.
    921933
    922 This command can be excluded from the shell command set by
    923 defining ``CONFIGURE_SHELL_NO_COMMAND_SETENV`` when all
    924 shell commands have been configured.
     934This command can be excluded from the shell command set by defining
     935``CONFIGURE_SHELL_NO_COMMAND_SETENV`` when all shell commands have been
     936configured.
    925937
    926938**PROGRAMMING INFORMATION:**
     
    928940.. index:: rtems_shell_rtems_main_setenv
    929941
    930 The ``setenv`` is implemented by a C language function
    931 which has the following prototype:
     942The ``setenv`` is implemented by a C language function which has the following
     943prototype:
     944
    932945.. code:: c
    933946
    934947    int rtems_shell_rtems_main_setenv(
    935     int    argc,
    936     char \**argv
     948        int    argc,
     949        char **argv
    937950    );
    938951
    939 The configuration structure for the ``setenv`` has the
    940 following prototype:
     952The configuration structure for the ``setenv`` has the following prototype:
     953
    941954.. code:: c
    942955
     
    949962**SYNOPSYS:**
    950963
    951 .. code:: c
     964.. code:: shell
    952965
    953966    unsetenv variable
     
    955968**DESCRIPTION:**
    956969
    957 This command is remove to a ``variable`` from the set of environment
    958 variables.
    959 
    960 **EXIT STATUS:**
    961 
    962 This command will return 1 and print a diagnostic message if
    963 a failure occurs.
     970This command is remove to a ``variable`` from the set of environment variables.
     971
     972**EXIT STATUS:**
     973
     974This command will return 1 and print a diagnostic message if a failure occurs.
    964975
    965976**NOTES:**
     
    970981
    971982The following is an example of how to use ``unsetenv``:
    972 .. code:: c
    973 
    974     SHLL \[/] $ unsetenv BASEPATH
     983
     984.. code:: shell
     985
     986    SHLL [/] $ unsetenv BASEPATH
    975987
    976988**CONFIGURATION:**
     
    979991.. index:: CONFIGURE_SHELL_COMMAND_UNSETENV
    980992
    981 This command is included in the default shell command set.
    982 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_UNSETENV`` to have this
     993This command is included in the default shell command set.  When building a
     994custom command set, define ``CONFIGURE_SHELL_COMMAND_UNSETENV`` to have this
    983995command included.
    984996
    985 This command can be excluded from the shell command set by
    986 defining ``CONFIGURE_SHELL_NO_COMMAND_UNSETENV`` when all
    987 shell commands have been configured.
     997This command can be excluded from the shell command set by defining
     998``CONFIGURE_SHELL_NO_COMMAND_UNSETENV`` when all shell commands have been
     999configured.
    9881000
    9891001**PROGRAMMING INFORMATION:**
     
    9911003.. index:: rtems_shell_rtems_main_unsetenv
    9921004
    993 The ``unsetenv`` is implemented by a C language function
    994 which has the following prototype:
     1005The ``unsetenv`` is implemented by a C language function which has the
     1006following prototype:
     1007
    9951008.. code:: c
    9961009
    9971010    int rtems_shell_rtems_main_unsetenv(
    998     int    argc,
    999     char \**argv
     1011        int    argc,
     1012        char **argv
    10001013    );
    10011014
    1002 The configuration structure for the ``unsetenv`` has the
    1003 following prototype:
     1015The configuration structure for the ``unsetenv`` has the following prototype:
     1016
    10041017.. code:: c
    10051018
     
    10141027.. code:: c
    10151028
    1016     time command \[argument ...]
    1017 
    1018 **DESCRIPTION:**
    1019 
    1020 The time command executes and times a command.  After the command
    1021 finishes, time writes the total time elapsed.  Times are reported in
    1022 seconds.
     1029    time command [argument ...]
     1030
     1031**DESCRIPTION:**
     1032
     1033The time command executes and times a command.  After the command finishes,
     1034time writes the total time elapsed.  Times are reported in seconds.
    10231035
    10241036**EXIT STATUS:**
     
    10331045
    10341046The following is an example of how to use ``time``:
    1035 .. code:: c
    1036 
    1037     SHLL \[/] $ time cp -r /nfs/directory /c
     1047
     1048.. code:: shell
     1049
     1050    SHLL [/] $ time cp -r /nfs/directory /c
    10381051
    10391052**CONFIGURATION:**
     
    10421055.. index:: CONFIGURE_SHELL_COMMAND_TIME
    10431056
    1044 This command is included in the default shell command set.  When
    1045 building a custom command set, define``CONFIGURE_SHELL_COMMAND_TIME`` to have this command included.
    1046 
    1047 This command can be excluded from the shell command set by
    1048 defining ``CONFIGURE_SHELL_NO_COMMAND_TIME`` when all
    1049 shell commands have been configured.
     1057This command is included in the default shell command set.  When building a
     1058custom command set, define ``CONFIGURE_SHELL_COMMAND_TIME`` to have this command
     1059included.
     1060
     1061This command can be excluded from the shell command set by defining
     1062``CONFIGURE_SHELL_NO_COMMAND_TIME`` when all shell commands have been
     1063configured.
    10501064
    10511065**PROGRAMMING INFORMATION:**
     
    10531067.. index:: rtems_shell_rtems_main_time
    10541068
    1055 The ``time`` is implemented by a C language function
    1056 which has the following prototype:
     1069The ``time`` is implemented by a C language function which has the following
     1070prototype:
     1071
    10571072.. code:: c
    10581073
    10591074    int rtems_shell_rtems_main_time(
    1060     int    argc,
    1061     char \**argv
     1075        int    argc,
     1076        char **argv
    10621077    );
    10631078
    1064 The configuration structure for the ``time`` has the
    1065 following prototype:
     1079The configuration structure for the ``time`` has the following prototype:
     1080
    10661081.. code:: c
    10671082
     
    10741089**SYNOPSYS:**
    10751090
    1076 .. code:: c
     1091.. code:: shell
    10771092
    10781093    logoff
     
    10881103**NOTES:**
    10891104
    1090 The system behavior when the shell is exited depends upon how the
    1091 shell was initiated.  The typical behavior is that a login prompt
    1092 will be displayed for the next login attempt or that the connection
    1093 will be dropped by the RTEMS system.
     1105The system behavior when the shell is exited depends upon how the shell was
     1106initiated.  The typical behavior is that a login prompt will be displayed for
     1107the next login attempt or that the connection will be dropped by the RTEMS
     1108system.
    10941109
    10951110**EXAMPLES:**
    10961111
    10971112The following is an example of how to use ``logoff``:
    1098 .. code:: c
    1099 
    1100     SHLL \[/] $ logoff
     1113
     1114.. code:: shell
     1115
     1116    SHLL [/] $ logoff
    11011117    logoff from the system...
    11021118
     
    11061122.. index:: CONFIGURE_SHELL_COMMAND_LOGOFF
    11071123
    1108 This command is included in the default shell command set.
    1109 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_LOGOFF`` to have this
     1124This command is included in the default shell command set.  When building a
     1125custom command set, define ``CONFIGURE_SHELL_COMMAND_LOGOFF`` to have this
    11101126command included.
    11111127
    1112 This command can be excluded from the shell command set by
    1113 defining ``CONFIGURE_SHELL_NO_COMMAND_LOGOFF`` when all
    1114 shell commands have been configured.
     1128This command can be excluded from the shell command set by defining
     1129``CONFIGURE_SHELL_NO_COMMAND_LOGOFF`` when all shell commands have been
     1130configured.
    11151131
    11161132**PROGRAMMING INFORMATION:**
     
    11181134.. index:: rtems_shell_rtems_main_logoff
    11191135
    1120 The ``logoff`` is implemented by a C language function
    1121 which has the following prototype:
     1136The ``logoff`` is implemented by a C language function which has the following
     1137prototype:
     1138
    11221139.. code:: c
    11231140
    11241141    int rtems_shell_rtems_main_logoff(
    1125     int    argc,
    1126     char \**argv
     1142        int    argc,
     1143        char **argv
    11271144    );
    11281145
    1129 The configuration structure for the ``logoff`` has the
    1130 following prototype:
     1146The configuration structure for the ``logoff`` has the following prototype:
     1147
    11311148.. code:: c
    11321149
     
    11391156**SYNOPSYS:**
    11401157
    1141 .. code:: c
     1158.. code:: shell
    11421159
    11431160    rtc
     
    11481165.. index:: CONFIGURE_SHELL_COMMAND_RTC
    11491166
    1150 This command is included in the default shell command set.
    1151 When building a custom command set, define``CONFIGURE_SHELL_COMMAND_RTC`` to have this
    1152 command included.
    1153 
    1154 This command can be excluded from the shell command set by
    1155 defining ``CONFIGURE_SHELL_NO_COMMAND_RTC`` when all
    1156 shell commands have been configured.
     1167This command is included in the default shell command set.  When building a
     1168custom command set, define ``CONFIGURE_SHELL_COMMAND_RTC`` to have this command
     1169included.
     1170
     1171This command can be excluded from the shell command set by defining
     1172``CONFIGURE_SHELL_NO_COMMAND_RTC`` when all shell commands have been
     1173configured.
    11571174
    11581175exit - exit the shell
     
    11621179**SYNOPSYS:**
    11631180
    1164 .. code:: c
     1181.. code:: shell
    11651182
    11661183    exit
     
    11761193**NOTES:**
    11771194
    1178 In contrast to `logoff - logoff from the system`_,
    1179 this command is built into the shell interpreter loop.
     1195In contrast to `logoff - logoff from the system`, this command is built into
     1196the shell interpreter loop.
    11801197
    11811198**EXAMPLES:**
    11821199
    11831200The following is an example of how to use ``exit``:
    1184 .. code:: c
    1185 
    1186     SHLL \[/] $ exit
     1201
     1202.. code:: shell
     1203
     1204    SHLL [/] $ exit
    11871205    Shell exiting
    11881206
     
    11931211**PROGRAMMING INFORMATION:**
    11941212
    1195 The ``exit`` is implemented directly in the shell interpreter.
    1196 There is no C routine associated with it.
    1197 
    1198 .. COMMENT: COPYRIGHT (c) 1988-2008.
    1199 
    1200 .. COMMENT: On-Line Applications Research Corporation (OAR).
    1201 
    1202 .. COMMENT: All rights reserved.
    1203 
     1213The ``exit`` is implemented directly in the shell interpreter.  There is no C
     1214routine associated with it.
Note: See TracChangeset for help on using the changeset viewer.