In bash scripting, to assign a value to a variable, write the variable name, then an equal sign with no spaces, then the value. For example, name=John assigns 'John' to the variable 'name'. Spaces around the equal sign cause errors because bash treats spaces as separators. After assignment, you can use the variable by prefixing it with a dollar sign, like echo $name to print its value. The execution table shows step-by-step how variables 'name' and 'age' get assigned and how the value of 'name' is printed. Remember, no spaces around '=' in assignments.