Bash, like any programming language, can set and unset variables. Global environment variables also play a big role in bash scripting. In this lesson, we'll learn how to declare and use variables,
export them to other processes spawned from our current shell, and go through a quick example of how to leverage them in a script.
When you use the global variable
$PWD on minute 3:10, is it the same of doing $(pwd) ?
Good question. I usually favor the $PWD variable but figured they were the same. It looks like there's some differences between the two though: https://stackoverflow.com/questions/10795014/pwd-vs-pwd-regarding-portability