Operating System - HP-UX
1753840 Members
8361 Online
108806 Solutions
New Discussion юеВ

Re: how should i remove/delete environments

 
SOLVED
Go to solution
rustam_2
Super Advisor

how should i remove/delete environments

Hi all,
I have environments which were set through CLI
$export .....

I havent configured .bash_profile file, my environments just for this session for now.
Now i need to remove/delete one of the environments. there is not man for export, i couldnt find in other manuals syntax of export.

Would you explain, how can i remove/delete environments with CLI.

Regards,
rustam
10 REPLIES 10
Patrick Wallek
Honored Contributor
Solution

Re: how should i remove/delete environments

Use the command 'unset'.

For example:

$ export ME=you
$ echo $ME
you
$ unset ME
$ echo $ME

$
rustam_2
Super Advisor

Re: how should i remove/delete environments

Thanks, Patrick
i could delete. and now i know this useful command. by the way, i have these environments:
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
ORACLE_SID="test"

when i typed
$echo ORACLE_HOME
i got
ORACLE_HOME
but not value of ORACLE_HOME

the same with ORACLE_SID
$echo ORACLE_SID
ORACLE_SID

is it wrong?
Kapil Jha
Honored Contributor

Re: how should i remove/delete environments

are you checking these from oracle user, these variables set for oracle user to startup oracle.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Patrick Wallek
Honored Contributor

Re: how should i remove/delete environments

When you echo an environment variable you must preface it with the $ symbol. Notice my examples above.

echo $ME

or

echo ${ME}

The export and unset command do NOT require the $ though.

The bash man page contains information on the export and unset commands (or more accurately shell built-ins).
Steven Schweda
Honored Contributor

Re: how should i remove/delete environments

> [...] there is not man for export, [...]

man

Look for "parameter" and/or "variable".

> when i typed
> $echo ORACLE_HOME
> i got
> ORACLE_HOME
> but not value of ORACLE_HOME

man

Look for "parameter" and/or "variable".

In the mean time, ...

echo $ORACLE_HOME
Johnson Punniyalingam
Honored Contributor

Re: how should i remove/delete environments

you have missed " $ " $$-> my 2 cents

# export TERM=vt100
# echo $TERM

http://www.injunea.demon.co.uk/pages/page207.htm
Problems are common to all, but attitude makes the difference
rustam_2
Super Advisor

Re: how should i remove/delete environments

Thanks for all.
I could and read a lot about environments. Later i will come back this thread to discussing about .profile for static environments.

Regards,
Rustam
Steven Schweda
Honored Contributor

Re: how should i remove/delete environments

> [...] Later i will come back this thread
> to discussing about .profile for static
> environments.

If you have a different topic, why not start
a different thread? The cost is low.
Steven E. Protter
Exalted Contributor

Re: how should i remove/delete environments

Shalom rustam,

There are a lot of scripts to help manage environments, posted to various ITRC threads.

There are helpful tools that can assist the learning process and possibly resolve your issue.

Example thread with good stuff:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=178514

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com