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:
Saved the script as
prjenv.sh. As I practiced running the scripts or any executable using
./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 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.