您的位置:首页 > 运维架构 > Shell

shell--内建命令--exec

2016-03-24 10:31 756 查看
1man exec

exec [-cl] [-a name] [command [arguments]]
If command is specified, it replaces the shell.  No new process is created.  The arguments become the  arguments  to  command.   If  the  -l option  is supplied, the shell places a dash at the beginning of the zeroth argument passed to command.  This is what login(1) does.  The -c option causes command to be executed with an empty environment.  If -a is supplied, the shell passes name as the zeroth argument to the executed  command.   If command cannot be executed for some reason, a non-interactive shell exits, unless the shell option execfail is enabled, in which case it returns failure.  An interactive shell returns failure if the file cannot be executed.  If command is  not  specified,  any redirections take effect in the current shell, and the return status is 0.  If there is a redirection error, the return status is 1.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: