请解释 。 ./ab_project_setup.ksh $(pwd)声明

时间:2010-11-12 09:46:26

标签: unix command pwd

请解释本声明的含义

. ./ab_project_setup.ksh $(pwd)

2 个答案:

答案 0 :(得分:2)

添加到Alberto的答案:

这是一个小型演示:

$ cat a.sh        # the script a.sh just exports a variable foo
export foo="$1"   # with it's value set to first command line argument.
$ echo $foo       # currently variable foo is not set.

$ . ./a.sh $(pwd) # source the script passing it pwd as argument.
$ echo $foo       # variable foo is now set.
/home/codaddict
$ pwd             # the present working directory.
/home/codaddict

答案 1 :(得分:1)

.

意味着来源

./ab_project_setup.ksh

您要采购的文件的名称

$(pwd)

扩展到当前工作目录,并作为参数传递给脚本。