免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1047 | 回复: 0
打印 上一主题 下一主题

source、点命令、builtin [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-12 16:17 |只看该作者 |倒序浏览

                [color="#0001FF"]1. source命令和点命令(.)
(1)source命令和点命令是两个等价的命令。例: source filename 等价于 . filename 。(2)source命令在当前bash环境下执行filename,通常用于重新执行刚修改的初始化文件,使之立即生效,而不必注销并重新登录。这个filename不需要具有可执行权限。(3)shell脚本(scripts)可以直接运行,而不需要由source命令或点命令来启动,因为shell会启动一个子shell去运行scripts,只要scripts文件具有可执行权限。(4)source命令和点命令都属于builtin命令,即shell的内置命令,所以在linux系统中找不到source命令和点命令所在的目录。
[color="#0001FF"]2. builtin[color="#FF0102"]A. builtin定义:        In computing, a shell builtin is a
command
or a
function
, called from a
shell
, that is executed directly in the shell itself, instead of an external executable
program
which the shell would load and execute.[color="#FF0102"]B. builtin命令集:builtin, !, %, ., :, @, {, }, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case, cd, chdir, command, complete,continue, default, dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export, false, fc, fg,filetest, fi, for, foreach, getopts, glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit, local, log, login,logout, ls-F, nice, nohup, notify, onintr, popd, printenv, pushd, pwd, read, readonly, rehash, repeat, return, sched, set,setenv, settc, setty, setvar, shift, source, stop, suspend, switch, telltc, test, then, time, trap, true, type, ulimit, umask,unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait, where, which, while引用来源:
http://www.gsp.com/cgi-bin/man.cgi?section=1&topic=builtin
[color="#FF0102"]
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/97771/showart_2092752.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP