Please excuse me if I am not clear while asking questions. I will try my best to be very clear while asking questions.
While learning Embedded Linux, we are setting an environment for our project. We wrote a shell script to set the environment which is similar to this:
export PROJECT=example-sys
export PRJROOT=/home/karim/${PROJECT}
export TARGET=powerpc-linux
export PREFIX=${PRJROOT}/tools
export TARGET_PREFIX=${PREFIX}/${TARGET}
export PATH=${PREFIX}/bin:${PATH}
cd $PRJROOT
Saved the script as prjenv.sh. As I practiced running the scripts or any executable using ./xyz.sh or ./abc, I ran ./prjenv.sh and the shell did not complain but when I gave export -p to see if the variables were exported or not, I could not find them in the list.
Later I noticed, I was expected to use . prjenv.sh, after I ran the script, it set the environment variables.
May I know what is the difference between . and ./ and when to use which one?
Please let me know if you need more information.
PS: This is my first time working with Linux so I apologize if some of the technical terms I used are wrong.
.is for. The references that @devnull listed will enlighten you. – msw May 18 '14 at 13:15