whats the difference between executing script like
# ./test
and
# . ./test
test is simple script for example
#!/bin/bash
export OWNER_NAME="ANGEL 12"
export ALIAS="angelique"
i know the results but im unsure what actually happens
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
./fooexecutedfooif it’s marked as executable and has a proper shebang line (or is an ELF binary). It will be executed in a new process.. ./fooor. fooloads the script in the current shell. It is equal tosource fooWith your example code you need to use the second way if you want the exported variables to be available in your shell.