I have a Bash script with the following lines of code:
echo "current directory is" $PWD echo $PWD # put current directory into a variable for use later in script originalDirectory=$PWD echo "contents of original directory variable:" originalDirectory
The first 2 lines of output make sense but the 3rd one does not. I expected it to output
contents of original directory variable: /media/sf_code/scripts
but it is just printing the name of the variable. Why doesn't it display the contents of the originalDirectory variable after the colon in that string?