I'm using Ubuntu 16.04 LTS. I have a question for setting PS1 and using single quotation marks. I have been practicing to change a prompt. So, I have followed an example in the book, then I'm faced a curiosity.
The example is below:
user1@myubuntu:~$ PS1='$PWD ' /home/user1
I learned that single quotation marks make special characters (like
\, etc.) to general characters.
So, I think the prompt above the statement must be like below:
user1@myubuntu:~$ PS1='$PWD ' $PWD
Why does the special character (
$) still work in the single quotation marks?