Question

Please explain the meaning of this statement

. ./ab_project_setup.ksh $(pwd)
Was it helpful?

Solution

Adding to Alberto's answer:

Here is a small demo:

$ 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

OTHER TIPS

.

means source what is following

./ab_project_setup.ksh

the name of the file you are sourcing

$(pwd)

expands to the current working directory and is passed as argument to the script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top