Unset Command in Linux does not clear the Variable

Viewed 139

I am trying to unset a variable in Linux, but the unset command isn't working.

[jisip@slc10xxx plsql]$ echo $PERL5LIB
/net/slcnasxxx.in.ecalor.com/export/xxx/bin
[jisip@slc10xxx plsql]$ unset PERL5LIB
[jisip@slc10xxx plsql]$ echo $PERL5LIB
/net/slcnasxxx.in.ecalor.com/export/xxx/bin

Any ideas or alternatives?

1 Answers

I was able to resolve this by using unsetenv instead of unset.

[jisip@slc10xxx plsql]$ unsetenv PERL5LIB
[jisip@slc10xxx plsql]$ echo $PERL5LIB                                                                                                                                                                   
PERL5LIB: Undefined variable.
[jisip@slc10xxx plsql]$ 

Hope this helps out!

Related