home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume13
/
korner
/
func
< prev
next >
Wrap
Text File
|
1988-01-31
|
495b
|
31 lines
function setenv
{
export $1
eval $1=\"$2\"
}
function unsetenv
{
eval $1=\"\"
}
KD=/tmp/kd$$
function source
{
if [ -s $1 ]
then
printenv >$KD.pe
csh -c "source $1; echo +E >$KD.csh; /usr/ucb/printenv | comm -23 - $KD.pe >>$KD.csh; echo +A >>$KD.csh; alias >>$KD.csh; echo +S >>$KD.csh; set >>$KD.csh; echo +D >>$KD.csh; dirs >>$KD.csh"
korner $KD.csh $KD.env
. $KD.env
if [ -n "$KDOUT" ]
then
cat $KD.env >>$KDOUT
fi
rm $KD.*
else
echo source: $1 not found
fi
}