请解释此陈述的含义

. ./ab_project_setup.ksh $(pwd)
有帮助吗?

解决方案

添加 阿尔贝托的答案:

这是一个小演示:

$ 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

其他提示

.

意味着来源以下内容

./ab_project_setup.ksh

您要采购的文件的名称

$(pwd)

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top