When I run:
$ env | grep PS1
I get no output which means the environment variable PS1 is not in my
environment list.
However, when I run:
$ echo $PS1
I do get the value of the PS1 variable.
Why is this?
Thank you,
Joe
Because your PS1 variable is not an environment variable,if you use
$export PS1=xxxx
$env | grep PS1
will get it!