Sponsored Content
Full Discussion: how to unsetenv ?
Top Forums UNIX for Dummies Questions & Answers how to unsetenv ? Post 10930 by jamesbond on Sunday 25th of November 2001 02:44:55 PM
Old 11-25-2001
how to unsetenv ?

I executed the following lines twice (accidentally)

setenv JAVA_HOME=/usr/local/jdk1.1.8
setenv PATH $JAVA_HOME/bin:$PATH

I'm in the tcsh shell (freebsd 4.1.1)
When I do : echo $PATH it shows up like this:

/usr/local/jdk1.1.8=/bin /usr/local/jdk1.1.8=/bin

1 .How can I remove one of those ? ( I tried unsetenv, but I didn't succeed)

2. Why does it add a '=' in the path? Is this correct?
 
getusershell(3C)					   Standard C Library Functions 					  getusershell(3C)

NAME
getusershell, setusershell, endusershell - get legal user shells SYNOPSIS
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void); DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If /etc/shells does not exist, the following locations of the standard system shells are used in its place: /bin/bash /bin/csh /bin/jsh /bin/ksh /bin/pfcsh /bin/pfksh /bin/pfsh /bin/sh /bin/tcsh /bin/zsh /sbin/jsh /sbin/pfsh /sbin/sh /usr/bin/bash /usr/bin/csh /usr/bin/jsh /usr/bin/ksh /usr/bin/pfcsh /usr/bin/pfksh /usr/bin/pfsh /usr/bin/sh /usr/bin/tcsh /usr/bin/zsh /usr/xpg4/bin/sh The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells. The setusershell() function rewinds the file or the list. The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells. RETURN VALUES
The getusershell() function returns a null pointer on EOF. BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved. SunOS 5.10 30 Aug 2004 getusershell(3C)
All times are GMT -4. The time now is 01:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy