Basic Linux Command Example: 


Get help on Linux exec Command.


   Linux exec command is use to replace the shell with the given command on Linux system.  The Linux exec command is one of bash shell built in command.  The command example below show how to get help on Linux exec command using shell command, this help show information on how to use the Linux exec command, the exec command options and the arguments that can be use with Linux exec command.


Get Linux exec command help


  Execute help command and the name of Linux command that we want the help file, the example below we execute help command with -m option to get the help for exec command using the manpage format.

exec linux command

[linux@fedora11 ~]$ help -m exec


    exec - Replace the shell with the given command.



    exec [-cl] [-a name] [command [arguments ...]] [redirection ...]



    Replace the shell with the given command.


    Execute COMMAND, replacing this shell with the specified program.

    ARGUMENTS become the arguments to COMMAND.  If COMMAND is not specified,

    any redirections take effect in the current shell.



      -a name   pass NAME as the zeroth argument to COMMAND

      -c                execute COMMAND with an empty environment

      -l                place a dash in the zeroth argument to COMMAND


    If the command cannot be executed, a non-interactive shell exits, unless

    the shell option `execfail' is set.


    Exit Status:

    Returns success unless COMMAND is not found or a redirection error occurs.






    GNU bash, version 4.0.16(1)-release (i386-redhat-linux-gnu)

    Copyright (C) 2009 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>


[linux@fedora11 ~]$


Keywords: exec, exec command, linux exec command, exec linux command, exec help, help exec, command exec help, help exec command