Chinaunix首页 | 论坛 | 博客
  • 博客访问: 404191
  • 博文数量: 65
  • 博客积分: 1491
  • 博客等级: 上尉
  • 技术积分: 702
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-30 15:57
文章分类
文章存档

2011年(6)

2010年(12)

2009年(47)

我的朋友

分类: LINUX

2009-11-12 16:17:53

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命令和点命令所在的目录。

2. builtin
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.
B. builtin命令集:
builtin!%.:@{}aliasallocbgbindbindkeybreakbreakswbuiltinscasecdchdir
commandcomplete,continuedefaultdirsdodoneechoechotcelifelseendendifendswesac
evalexecexitexportfalsefcfg,filetestfiforforeachgetoptsglobgotohashhashstathistory
hupifjobidjobskilllimitlocalloglogin,logoutls-Fnicenohupnotifyonintrpopdprintenv
pushdpwdreadreadonlyrehashrepeatreturnschedset,setenvsettcsettysetvarshiftsource
stopsuspendswitchtelltctestthentimetraptruetypeulimitumask,unaliasuncomplete
unhashunlimitunsetunsetenvuntilwaitwherewhichwhile
引用来源:
<--文章完-->

阅读(2236) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-11-26 14:23:49

very good