1

On one of my systems, I have a strange situation. When I execute env on any machine the result looks like below:

[sup@vviesup07 ~ ]$ env |grep PATH
PATH=/usr/java/latest/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/sup/.local/bin:/home/sup/bin:/home/sup/.local/bin:/home/sup/bin
[sup@vviesup07 ~ ]$

But on one machine with one user, the result looks like:

[aut@vviesup09 ~ ]$ env |grep PATH
PATH=.:/usr/lib/oracle/12.2/client64/bin:$PATH
[aut@vviesup09 ~ ]$

As you see, PATH is not evaluated. It just displays $PATH instead of evaluating the variable. What can be wrong here? Where can I look for the error?

Claus
  • 11
  • 1

1 Answers1

3

It looks like some command for updating PATH used a single-quote ' instead of double quote " or no-quote:

PATH='.:/usr/lib/oracle/12.2/client64/bin:$PATH'

Replace it with a double-quote:

PATH=".:/usr/lib/oracle/12.2/client64/bin:$PATH"

To look for it, check this question and answer about PATH.

slhck
  • 223,558
  • 70
  • 607
  • 592
anatolyg
  • 421
  • 5
  • 10
  • Thanks for the answer, but I use no quotes at all: export PATH=/usr/lib/oracle/12.2/client64/bin:$PATH – Claus Mar 30 '18 at 09:40
  • You should debug it: now that you know which script gives you trouble, add e.g `echo $PATH` to it. – anatolyg Mar 31 '18 at 09:26