S'il vous plaît, expliquez . ./ab_project_setup.ksh déclaration $ (pwd)
Question
S'il vous plaît expliquer le sens de cette déclaration
. ./ab_project_setup.ksh $(pwd)
La solution
Ajout de Alberto 's répondre:
Voici une petite démo:
$ 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
Autres conseils
.
signifie la source ce qui est suivant
./ab_project_setup.ksh
le nom du fichier que vous sourcez
$(pwd)
élargit le répertoire de travail courant et est passé comme argument du script.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow