From: Jose Luis on
Hi,

I need to set the var LIBPATH before execute the "ssh" command,
because there is a user library that overlap a system library used
linked by ssh (libcrypto.a)

LIBPATH="/opt/freeware/lib" ssh

If I run the command:

LIBPATH="/opt/freeware/lib" echo "$LIBPATH"

Why LIBPATH keeps its original value?

Thanks in advance,
Jose Luis
From: pk on
Jose Luis wrote:

> I need to set the var LIBPATH before execute the "ssh" command,
> because there is a user library that overlap a system library used
> linked by ssh (libcrypto.a)
>
> LIBPATH="/opt/freeware/lib" ssh
>
> If I run the command:
>
> LIBPATH="/opt/freeware/lib" echo "$LIBPATH"
>
> Why LIBPATH keeps its original value?

Because it's replaced by the shell with its preexisting value, before echo
even sees it. You should run this instead to demonstrate that it works:

LIBPATH="/opt/freeware/lib" sh -c 'echo "$LIBPATH"'