cannot unset env variables from script
- by w00t
Hi,
I am trying to unset all environment variables from within a script. The script runs fine but if I run env it still shows all the variables set.
If I run the command from CLI, it works and the variables are unset.
unset `env | awk -F= '/^\w/ {print $1}' | xargs`
Have any idea how to run this from a script?
Also, have any idea how to source /etc/profile from a script? This doesn't work either.
I need to set variables with same names but different paths, depending on the instances my users need.