#!/bin/sh
# see also ../.csh/unsetenv.csh
# Unset all environment variables.
# invoke from sh as
#	. `which unset.sh`
# not just as
#	unset.sh
# as the latter runs in a sub shell & does not affect the original shell.
# Bug: it tries to unset each component in variable strings, 
#	hence the redirect to null
for i in ` set `
	do
	xx=`echo "$i" | /usr/bin/awk -F = '{printf "%s\n",$1}'`
	# /bin/echo "Name:$xx	Value:`/usr/bin/printenv $xx`"
	set $xx =
	export $xx=	2> /dev/null
	unset $xx	2> /dev/null
	done
# I no longer use
#       --field-separator = string
# as FreeBSD-5.0-DP2 does not support it, whereas 4.7 & 5 both support -F
unset xx
unset i

echo "Calling: export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games"
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games
echo 'Calling: export PS1="$ "'
export PS1="$ "
