bash builtin command exec 的man手册有一句不甚求解If -a is supplied,the shell passes name as the zeroth argument to the executed command.说不清楚给想关背景也可以,或是给个例子.
来源:学生作业学帮网 编辑:学帮网 时间:2024/06/02 02:12:13
bash builtin command exec 的man手册有一句不甚求解
If -a is supplied,the shell passes name as the zeroth argument to the executed command.
说不清楚给想关背景也可以,或是给个例子.
如果你在exec后添加-a选项,则该选项后面的name参数 将作为位置参数$0的值,本来$0的值为当前进程所对应的命令的名字.
我给你一例 对比之,以我的名字 ranpanf作为 -a的name参数.
ranpanf@ranpanf-laptop:~$ exec -a ranpanf bash
ranpanf@ranpanf-laptop:~$ echo $0
ranpanf
ranpanf@ranpanf-laptop:~$
看到了吗?
如果不加-a选项的话
ranpanf@ranpanf-laptop:~$ exec bash
ranpanf@ranpanf-laptop:~$ echo $0
bash
ranpanf@ranpanf-laptop:~$
这就是区别
bash builtin command exec 的man手册有一句不甚求解If -a is supplied,the shell passes name as the zeroth argument to the executed command.说不清楚给想关背景也可以,或是给个例子.
在centos6.0中执行man 出现 -bash:man:command not found 是什么原因,应如何解决?
builtin是什么
我在linux中运行 #php test.php之后出现-bash:php:command not found谁知道怎么解决呢?
什么是BUILTIN容器?网络管理
command command line parameters
用一键ghost备份时出现几行英文,请明人指导?内容如下:GRUB4DOS 0.4.5c 2013-06-30,Mem:634k/3581M/512M,End:355D01[Minima] BASH-like line editing is supported.For the first word,TABlists possible command completions.Anywhere else TAB
开机问题,请各位高手解决我的笔记本开机出现这样的英文,如何解决: Minimal Bash-like line editing is supported. For the first word. TAB lists possible command completions.Anywhere else TAB lists the possible .Comletions of a
in command
get command
command type.
get command
specify command
/bin/bash for ((a=1;a
minimal bash-like line editing is supported
什么是chain of command
chain of command是什么意思
file or command not