Re: question about setenv



On 27 Oct 2006 06:15:38 -0700, EdStevens
<quetico_man@xxxxxxxxx> wrote:
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"

setenv is a csh command. The sh equivalent is
export ORACLE_SID; ORACLE_SID=mysid
In some shells this can be written as one command
export ORACLE_SID=mysid


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.

I don't know what this setenv does, but it should have a man page.
Try "apropos setenv" to see if there is more than one setenv man page.


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.)

I'd like to know how they explain that.


--
I'll never get off this planet.
-- Luke Skywalker
.



Relevant Pages

  • Re: question about setenv
    ... When running the script, the setenv line returns "setenv: ... setenv is a C-Shell builtin, ... If you put environment variables in a C-Shell script, ...
    (comp.unix.shell)
  • Re: [SLE] bash script for environment variables
    ... Ken Schneider wrote: ... setenv ISC_PASSWORD 999ans ... equivalent which can be called from a script? ...
    (SuSE)
  • Re: Verified for Spam -RODIN- I2R: Problem Accessing Perl Modules Through .htaccess
    ... may need to set the "SetEnv" direction in the httpd.conf. ... By the way,why don't include this line in your CGI script? ... But I have set .htaccess to contain this: ... the correct path: ...
    (perl.beginners)
  • Re: question about setenv
    ... So have you read documentation about the setenv ... It was something found in a script generated by a major, ... does document that 'setenv' is native to some shells, ...
    (comp.unix.shell)
  • Re: Question, Need help
    ... which is clearly coming from sh, and setenv is a csh command. ... And if you were trying to direct the GUI to display on your desktop, ...
    (comp.lang.verilog)