question about setenv
- From: "EdStevens" <quetico_man@xxxxxxxxx>
- Date: 27 Oct 2006 06:15:38 -0700
Working with Oracle 9.2 on Solaris 5.9, I ran into some questions about
setenv (Disclaimer: I'm a DBA, not an SA).
Product has a tool that produces a set to .sh an .sql scripts which are
used to create a new database. The produced script that drives the
process (call it mysid.sh). To demonstrate and reproduce my problem, I
have reduced the script to this:
#!/bin/sh
-set x
setenv ORACLE_SID mysid
When running the script, the setenv line returns "setenv: not found"
So I do a find on setenv, locate the directory it is in and add it to
my path. Then the command returns:
$> edstest.sh
+ setenv ORACLE_SID mysid
cp: cannot create /usr/estevens/pref/.environ: No such file or
directory
cp: cannot create /usr/estevens/pref/.environ: No such file or
directory
$>
ok, there is no directory /usr/estevens/pref but why is setenv trying
to write a file at all? And why would it try to write that file to a
directory that is not guaranteed to be there? In the above example, my
$HOME directory is /usr/estevens, but it cant' be assumed that there
will necessarily be a $HOME/pref.
Enquiring minds want to know. For my purposes I can get around this my
inserting
ORACLE_SID=mysid
export ORACLE_SID
but would like to further my knowledge of Unix.
(Another anomoly, which I need to pose to the vendor (Oracle) is that
it appears from the man page that setenv is for csh, but not sh, yet
they gen a script which specifically runs sh and calls setenv.)
Thanks.
.
- Follow-Ups:
- Re: question about setenv
- From: Kaz Kylheku
- Re: question about setenv
- From: Bill Marcum
- Re: question about setenv
- From: Bruce Barnett
- Re: question about setenv
- From: Bruce Barnett
- Re: question about setenv
- From: Hubble
- Re: question about setenv
- Prev by Date: Re: send in email with message in body and attachment
- Next by Date: counting ip addresses
- Previous by thread: Relate I/O's activity to processes in AIX/HPUX/Linux
- Next by thread: Re: question about setenv
- Index(es):
Relevant Pages
|