I am running this script on Linux and FreeBSD:

LD_LIBRARY_PATH="/x/bogus1:/x/bogus2"
LD_LIBRARY_PATH_ENV=$(env | grep ^LD_LIBRARY_PATH= | sed -e s/^LD_LIBRARY_PATH=//)
echo "LD_LIBRARY_PATH_ENV=$LD_LIBRARY_PATH_ENV"

On FreeBSD it prints "LD_LIBRARY_PATH_ENV=" as it should.
However, on Linux it prints "LD_LIBRARY_PATH_ENV=/x/bogus1:/x/bogus2"


Why does LD_LIBRARY_PATH="/x/bogus1:/x/bogus2" set the environment variable on Linux?

bash-5.3


Thanks,

Yuri



Reply via email to