Sambit Nayak pisze:
[...]
> I think clear_env() is not handling the multi-line env variable properly.
> clear_env() tries to unset all env vars set before, and uses the "sed"
> piece to isolate the name of the env var from the shell env var setting.
> This is where it messes up in a multi-line format of env var.
> It replaces everything starting from "=" on a line, and thus gets the
> name of the env var.
> On the line ":DO=..." above, ":DO" is hence isolated as the env var
> wrongly.
> 
> You can also try putting "grep '^[A-Z]'" between "env" and "sed ..." in
> the clear_env() command.
> That should isolate the correct env vars.
> 
> Please let me know how it goes.
Ok, now it works from 'screen'.
The fixed Clear_env() looks like this:

Clear_env() {
  for v in Nothing $(/bin/env | grep '^[A-Z]' | sed -ne 's/=.*//p'); do
                case "$v" in

MAKE|MAKEFLAGS|MAKETOOLS|HOME|LOGNAME|USER|OS|TEAMWARE|OPTHOME|WEBBASE)
                        ;;
                [TV]_FLAG)
                        ;;
                *)
                        unset $v;;
                esac
        done
}

-- 
Piotr Jasiukajtis | estibi | SCA OS0072
http://estseg.blogspot.com

Reply via email to