$HOME environment

From: Wianecki, Christopher (Christopher.Wianecki@sothebys.com)
Date: Fri Dec 12 2003 - 14:01:41 EST


Hello all, I am not sure what I am doing wrong. Ok, here is the thing. I
have a script that does relay on $HOME environment. How can I run a script
from su command that would read this environment correctly?

When I do issue command su - interface -c "env" I then do see HOME setup the
way it should

% su - interface -c "env"
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
_=/usr/bin/env
HZ=
CSINTSLEEPSEC=15
PATH=/usr/bin:
LOGNAME=interface
SHELL=/bin/ksh
HOME=/home/interface
TERM=xterm
PWD=/home/interface
TZ=US/Eastern

When I do try to echo $HOME running the same I get $HOME for the current
user. How can I get the $HOME directory environment from the user I would
like to run script as?

% su - interface -c "echo $HOME"
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
/cw
$

Thanks so much for help, its probably some stupid thing I am doing and my
mind is simply not looking at it.

Chris

www.sothebys.com
**********************************************************************
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:27:41 EDT