Setting my bash shell enviroment variables

my experience on managing oracle on linux is very little.My background is generally on windows server.
Every time i want to use an oracle application i always have to set the environment variables like $oracle_home.How can i make this setting permanent.I have tried doing this when logged on as 'oracle' user using the command vi .bash_profile. But if i try to save it i get the annoying message that the file has not been opened for editing.
In summary how can i open my bash profile file for editing.
Thank you
Charles

if i try to save it i get the annoying message that the file has
not been opened for editing..bash_profile is normally updateable by the owner only (or by root). If you get that message, then probably you're trying to do that as another OS user. Please try the following :
$ cd /home/oracle # (where /home/oracle is the oracle OS user's home directory)
$ ls -la .bash_profile
-rw-r--r-- 1 oracle dba 1687 May 16 11:39 .bash_profile
$ id
uid=500(oracle) gid=500(dba) groups=500(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh
$

Similar Messages

  • DIsplay variable setting ReflectionX in Bash shell

    Everyone,
    Can somebody help me with setting display variable for running Configtool in ReflectoinX in Bash shell.
    Appreciate your time. Thanks.

    > It looks like it will work..only thing is that we need to set display variable..i assume.
    If you logon as <sid>adm then no DISPLAY (or other variable) must be set if you use XDMCP.
    > I am doing sudo for opening a java tool which needs x window..other x windows like visual admin is working fine but for configtool, i am getting this error saying display variable is not set.
    That's what I was saying - do not switch users (sudo, su etc.) - that will delete the environment and invalidate .Xauthority.
    > I am not given the <sid>adm password, can i just use X window with sudo OR do i need to get the <sid>adm password to start the configtool..
    In that case I would not use XCMCP to connect but a pure telnet, do sudo and then set the DISPLAY to
    <your-IP>:<reflection-display>. the latter can be found when open Reflection in the lower part of the configuration window.
    Markus

  • How to set enviroment variables for Inso Filter

    Hi everyone,
    I want to convert word documents to html using CTX_DOC.Filter.According to the documentation,I know I neednot set the 'Inso Filter'in the preference when creating index,but I must set enviroment variables for Inso Filter.
    I found the following instructions for it in the 8.1.5 documentation,but I can't understand it well.Is there anyone can tell me how to set enviroments variables for Inso Filter on Windows2000 Server?(My DB version is 8.1.7EE)
    Environment Variable Locations
    All environment variables related to Inso filtering must made visible to interMedia Text. Set these variables in the following locations:
    listener.ora file. This makes the environment variables visible to the extproc PL/SQL process.
    The operating system shell from where ctxsrv server is started. This makes the environment variables visible to the ctxsrv process, which does background DML.
    Any suggestions are apreciated
    Reemon
    null

    NSAPI plugins are normally configured using parameters specified in magnus.conf and/or obj.conf. What plugin requires you set an environment variable?

  • How to set Enviroment Variable

    HI,
    I am using JDK 1.3.
    I want to know how should i set any new enviroment variable by using JAVA program with out any command line argument.

    Try asking the question again, and explain better - not understood.

  • Bash shell does not recognise 'java', 'javac' commands (Linux command line)

    i' ve used javac and java compile & execute commands to build the same application on the DOS command line with Windows - no problem.
    But when I try to compile the same file on the command line under Linux Redhat (7.1) using Bash shell i get <bash: javac: command not found> and <bash: java: command not found>.
    In both cases I'm using j2sdk1.4.2 downloaded from java.sun.com for Windows & Linux respectively.
    I make sure I have both the javac and the file I want to compile in the same directory ../j2sdk1.4.2/bin for both the Windows and the Linux applications.
    Is there something I need to do to get bash to recognise javac, java etc? Is there a different setup procedure?
    Any angles on this are much appreciated ..

    Have you tried these correctly..
    Set the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>
    To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>
    Then do
    export PATH=$PATH:$JAVA_HOME/bin
    verify it has worked by simply typing
    java
    You can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    This shall resolve the issue .

  • How to use enviroment variables in JSP code?

    I�m developing a web server with JSP�s, and I need to move the application to others computers. I need to access to a directory, but I don�t know it because the user can install the Application in the directory he wants. So I need to access to that directory in the JSP code.
    The directory is "C:\Program Files\....\tomcat\webapps\ROOT\upload". I have the CATALINA_HOME enviroment variable defiened as "C:\Program Files\....\tomcat\", so I need to use something like "CATALINAHOME\\webapps\upload\", but I don�t know how to mekr the JSP code to understand the enviroment variable CATALINA_HOME.
    I�ve tried with %CATALINA_HOME%, but the Tomcat server doesn�t recognize it. How can I access to that directory?
    Thanks (Sorry about my english)

    My JSP�s are in: %CATALINA_HOME%\webapps\ROOT\
    I wan�t to access to %CATALINA_HOME%\webapps\ROOT\upload\
    My JSP code:
    <% ...
    String DPATH = "C:\\Program Files\\JBuilder7\\jakarta-tomcat-4.0.3\\webapps\\ROOT\\upload\\";
    File newfile = null;
    newfile = new File(DPATH+filename);
    %>
    I want the JSP to locate the directory \webapps\ROOT\upload\ without knowing the complete route "c:\Program Files\...", because I have the enviroment variable CATALINA_HOME with the value "C:\Program Files\JBuilder7\jakarta-tomcat-4.0.3\". SO the user of the aplication only has to set the CATALINA_HOME variable and the aplication should access the upload directory throught the CATALINA_HOME variable.
    I can�t explain it better. Sorry.

  • How to pass a result of SQL query to shell script variable

    Hi all,
    I am trying to pass the result of a simple SQL query that only returns a single row into the shell script variable ( This particular SQL is being executed from inside the same shell script).
    I want to use this value of the variable again in the same shell scirpt by opening another SQL plus session.
    I just want to have some values before hand so that I dont have to do multiple joins in the actual SQL to process data.

    Here an example :
    SQL> select empno,ename,deptno from emp;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7499 ALLEN              30
          7521 WARD               30
          7566 JONES              20
          7654 MARTIN             30
          7698 BLAKE              30
          7782 CLARK              10
          7788 SCOTT              20
          7839 KING               10
          7844 TURNER             30
          7876 ADAMS              20
          7900 JAMES              30
          7902 FORD               20
          7934 MILLER             10
    14 rows selected.
    SQL> select * from dept;
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ cat my_shell.sh
    ### First query #####
    ENAME_DEPTNO=`sqlplus -s scott/tiger << EOF
    set pages 0
    select ename,deptno from emp where empno=$1;
    exit
    EOF`
    ENAME=`echo $ENAME_DEPTNO | awk '{print $1}'`
    DEPTNO=`echo $ENAME_DEPTNO | awk '{print $2}'`
    echo "Ename         = "$ENAME
    echo "Dept          = "$DEPTNO
    ### Second query #####
    DNAME_LOC=`sqlplus -s scott/tiger << EOF
    set pages 0
    select dname,loc from dept where deptno=$DEPTNO;
    exit
    EOF`
    DNAME=`echo $DNAME_LOC | awk '{print $1}'`
    LOC=`echo $DNAME_LOC | awk '{print $2}'`
    echo "Dept Name     = "$DNAME
    echo "Dept Location = "$LOC
    $ ./my_shell.sh 7902
    Ename         = FORD
    Dept          = 20
    Dept Name     = RESEARCH
    Dept Location = DALLAS
    $                                                                           

  • How to use enviroment variables?

    I�m developing a web server with JSP�s, and I need to move the application to others computers. I need to access to a directory, but I don�t know it because the user can install the Application in the directory he wants. So I need to access to that directory in the JSP code.
    The directory is "C:\Program Files\....\tomcat\webapps\ROOT\upload". I have the CATALINA_HOME enviroment variable defiened as "C:\Program Files\....\tomcat\", so I need to use something like "CATALINAHOME\\webapps\upload\", but I don�t know how to mekr the JSP code to understand the enviroment variable CATALINA_HOME.
    I�ve tried with %CATALINA_HOME%, but the Tomcat server doesn�t recognize it. How can I access to that directory?
    Thanks (Sorry about my english)

    Try:
    System.getProperty("catalina.home");This is not the enviroment variable, but it's set by the catalina.bat file when starting java with the option -Dcatalina.home=%CATALINA_HOME%

  • Enviroment Variable settings

    Hello
          How to set the Environment Variable parameter settings done ?
          I want to install ECC - 6 in windows Xp professionel ,
          Kindly send me to how to set Enviroment Variables before starting installation .
    Regards
    Selvan

    Hi Selvan,
    I had already replied to your qurery in another thread
    could u let me know wat further information u require
    Sundar

  • Any tips on Controlling interactive bash shell on Cygwin via Java process?

    Ideally, I'd like to be able to control an interactive bash shell on Cygwin from a Java process. But for starters, I want to do 'ls > /cygdrive/c/fred.txt'. The little program to do this, below, doesn't work. It simply runs without error.
    Any ideas? And also, any tips on doing a fully interactive shell?
    --> Java program to test simple command:
    package com.treelogic_swe.real_estate_explorer.utils;
    import java.io.File;
    import java.io.InputStream;
    * Quick and dirty test of Java to Cygwin bash shell process control.
    * Thanks to [email protected]
    * re: http://groups.google.com/group/comp.lang.java.help/browse_thread/thread/914403fbdd1de127/40363d2e7cbae823?lnk=st&q=cygwin+shell+java+process+runtime&rnum=1&hl=en#40363d2e7cbae823
    public class RunSystemCommand {   
        public static void main(String args[]) throws Throwable {
         // System command to run
         String cmd = "ls > /cygdrive/c/fred.txt";
            String [] sysArgs = { };
         // Set the working directory for the OS command processor
         File workDir = new File( "c:/cygwin/bin" );
         Process bash = Runtime.getRuntime().exec( cmd, sysArgs, workDir );
         InputStream bashIn = bash.getInputStream();
         while( bashIn.read() != -1 ); // Added, as otherwise the ls hangs.
         bash.waitFor();
    }

    Ideally, I'd like to be able to control an
    interactive bash shell on Cygwin
    What do you mean by this? Do you just want to start a bash shell, and have it's input and output come from and go to your Java program?
    Please be specific about what you want, as there are a couple of interpretations for what you said. You need to understand the differences and relationships among terminals, shells, shell builtins, and executables.
    You'll want to read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    from a Java
    process. But for starters, I want to do 'ls >
    /cygdrive/c/fred.txt'. The little program to do
    this, below, doesn't work. It simply runs without
    error.
    , <, |, and others are specific to the shell. When you're in a terminal, and you type ls > /tmp/zzz, it's the bash shell that interprets the >. Cygwin doesn't know anything about it. ls doesn't know anything about it.So if you want to to that, the command you'd execute from Java is not ls, but bash (or some other shell). You'd then tell bash to execute the rest. I'm not sure what the command line arg is for bash to tell it the rest of the command line args are a command that bash should interpret and execute. I think it might be -c like it is for zsh. So you'd need to do something like Runtie.getRuntime().exec("bash -c 'ls > /tmp/zzz'");

  • AppleScript: How to let AppleScript use the same environment as Bash shell does?

    Howdy!
    I can run AppleScript from Bash shell.
    I can also run Bash shell from AppleScript.
    So my question is when I run a Bash shell script from AppleScript, I am hit with a path problem.
    Suppose my AppleScript is under ~user/a.scpt. I want my AppleScript to know its current path (i.e. ~user/a.scpt).
    So a quick snippet test in my AppleScript shows that AppleScript always begins from the root directory:
    do shell script "pwd"
    So let's do a workaround AppleScript like this:
    tell application "Finder" to set currentDir to (target of front Finder window) as text
    do shell script "cd " & (quoted form of POSIX path of currentDir) & "; pwd"
    This works. However, this approach poses a potential danger.
    Suppose when I run this AppleScript for a bash script, I inadvertently clicked other Finder Window. That would result in execution of bash script in that newly clicked Finder Window, resulting in a big mess.
    Is there a better way to let the AppleScript to know its current path?

    The following is what your Applescript environment looks like, so plan accordingly.  If you want your Applescripts to be portable to other user environments, you should NOT depend on your environment, but rather embed all the environment knowledge you need into your script.
    Applescript "do shell script" environment
    pwd:
    /bin/ls -dlaeO@ .
    drwxr-xr-x  36 root  wheel  - 1292 Feb 28 09:58 .
        /usr/bin/id -a
    uid=501(raharris)
    gid=20(staff)
    groups=20(staff),
    402(com.apple.sharepoint.group.1),
    12(everyone),
    61(localaccounts),
    79(_appserverusr),
    80(admin),
    81(_appserveradm),
    98(_lpadmin),
    403(com.apple.sharepoint.group.2),
    33(_appstore),
    100(_lpoperator),
    204(_developer),
    398(com.apple.access_screensharing),
    399(com.apple.access_ssh)
    $#
    0
    $0
    /path/to/your/shell/script
    printenv:      
    SHELL=/bin/bash
    TMPDIR=/var/folders/4t/t1djbq6j5pj951x44l9hwxtc0000gn/T/
    Apple_PubSub_Socket_Render=/tmp/launch-mSKKJo/Render
    USER=<username_running_the_Applescript>
    SSH_AUTH_SOCK=/tmp/launch-7D4zpF/Listeners
    __CF_USER_TEXT_ENCODING=0x1F5:0:0
    PATH=/usr/bin:/bin:/usr/sbin:/sbin
    __CHECKFIX1436934=1
    PWD=/
    HOME=/Users/<home_dir_of_running_user>
    SHLVL=2
    LOGNAME=<username_running_the_Applescript>
    DISPLAY=/tmp/launch-qKucki/org.macosforge.xquartz:0
    _=/usr/bin/printenv
    Message was edited by: BobHarris

  • Bash shell scripting

    Dear Mac Users:
    I have a bash script which I copied from a bash book to learn how to use bash. Whenever I try to run it on Linux (cygwin--Windows Linux interpreter) it throws an error that something is wrong with the syntax.
    But when I try to run the same script on my Mac using Terminal.app the bash shell throws an error saying access denied. I chowned a copy of bash and referenced this copy in my script but I still get the error. I also chowned the script to the user account on my Mac. Why can I not run the script?

    #!/bin/bash
    # cookbook filename: mkalbum
    # makalbum - make an html "album" of a pile of photo files
    # ver 2.0
    # An album is a directory of html pages.
    # It will be created in the current directory
    # An album page is the html to display one photo,with
    # a title that is the filename of the photo, along with
    # hyperlinks to the first, previous, next, and last photos.
    # ERROUT
    ERROUT()
    printf "%b" "$@"
    } >&2
    # USAGE
    USAGE()
    ERROUT "usage: %s <newdir>
    " $(basename $0)
    # EMIT(thisph, startph, prevph, nextph, lastph)
    EMIT()
    THISPH="../$1"
    STRTPH="${2%.*}.html"
    PREVPH="${3%.*}.html"
    NEXTPH="${4%.*}.html"
    LASTPH="${5%.*}.html"
    if [ -z "$3" ]
    then
    PREVLINE='<TD> Prev </TD>'
    else
    PREVLINE='<TD> Prev </TD>'
    fi
    if [ -z "$4" ]
    then
    NEXTLINE='<TD> Next </TD>'
    else
    PREVLINE='<TD> Next </TD>'
    fi
    cat <<EOF
    <HTML>
    <HEAD><TITLE>$THISPH</TITLE></HEAD>
    <BODY>
    $THISPH
    <TABLE WIDTH = "25%">
    <TR>
    <TD> First </TD>
    $PREVLINE
    $NEXTLINE
    <TD> Last </TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>
    EOF
    if (($# !=1 ))
    then
    USAGE
    exit -1
    fi
    ALBUM="$1"
    if [ -d "${ALBUM}"]
    then
    ERROUT "Directory [%s] already exists.
    " ${ALBUM}
    USAGE
    exit -2
    else
    mkdir "$ALBUM"
    fi
    cd "$ALBUM"
    PREV=""
    FIRST=""
    LAST="last"
    while read PHOTO
    do
    # prime the pump
    if [ -z "${CURRENT}" ]
    then
    CURRENT="$PHOTO"
    FIRST="$PHOTO"
    continue
    fi
    PHILE=$(basename "${CURRENT}")
    EMIT "$CURRENT" "$FIRST" "$PREV" "$PHOTO" "$LAST" > "${PHILE%.*}.html"
    #set up for next iteration
    PREV="$CURRENT"
    CURRENT="$PHOTO"
    done
    PHILE=$(basename ${CURRENT})
    EMIT "$CURRENT" "$FIRST" "$PREV" "" "$LAST" > "${PHILE%.*}.html"
    # make the symlink for "last"
    ln -s "${PHILE%.*}.html" ./last.html
    # make a link for index.html
    ln -s "${FIRST%.*}.html" ./index.html

  • Enviroment variables!

    I have the java card kit 2_2_01. I have set the enviroment variables(at least i think so, i just did what the pdf says) and when I am trying to emulate one of the samples included,the message in the dos-prompt enviroment says
    Out of enviroment space.
    Exception in thread "main" java.lang.NoClassDefFoundError: apdutool/bat
    Generally it does that in every tool that I am trying to use. Thank you in advance for your interest!

    How is your environment set up ?
    The JRE is interpeting apdutool.bat, to apdutool/bat !
    Don't put apdutool.bat in your CLASSPATH. Just add the javacard \bin to your PATH. CLASSPATH is for Java ONLY, PATH is for Windows system environment

  • BEA_HOME enviroment variable: what is it?

    Could someone explain for me what I am suposed to fill in BEA_HOME to be able to harvast from Eclipse to OER? I am trying to follow this blog "http://brajeshde.blogspot.com.br/2012/01/my-first-experience-of-osb11gr1ps2.html" and I have no idea what is the purpose of BEA_HOME? Should I point to weblogic home?

    What is the corect setting to be point by BEA_HOME enviroment variable?
    My filesystem is:
    C:\Oracle\Middleware>dir
    01/11/2012 10:44 <DIR> coherence_3.7
    29/11/2012 18:06 603 domain-registry.xml
    01/11/2012 15:22 <DIR> JDev11g
    01/11/2012 10:44 <DIR> jdk160_29
    14/12/2012 16:57 <DIR> logs
    29/11/2012 15:58 <DIR> modules
    01/11/2012 10:44 625 ocm.rsp
    14/12/2012 13:55 <DIR> oepe_11.1.1.8.0
    01/11/2012 14:13 <DIR> oracle_common
    01/11/2012 14:14 <DIR> Oracle_OSB1
    01/11/2012 14:07 <DIR> Oracle_SOA1
    29/11/2012 15:59 137.285 registry.dat
    29/11/2012 15:59 3.665 registry.xml
    22/11/2012 11:54 <DIR> registry111
    29/11/2012 15:59 <DIR> repository111
    01/11/2012 14:29 <DIR> user_projects
    01/11/2012 10:40 <DIR> utils
    01/11/2012 14:14 <DIR> wlserver_10.3
    4 File(s) 142.178 bytes
    16 Dir(s) 144.914.165.760 bytes free
    While reading OER Guide, I read that I should point to my OSB HOme which in my case is C:\Oracle\Middleware\Oracle_OSB1. Other blog tells me that I should point to WebLogic home which in my case is C:\Oracle\Middleware\wlserver_10.3. And even other blog tell to point to the home where is all my Oracle tolls which in my case should be C:\Oracle\Middleware. What is the purpose to set this system variable? I can run weblogic, OSB and OER without that. The only reason I setted BEA_HOME was to use harvester and untill now, apparently there are no diference what the path I set the variable with.

  • How to get current directory and enviroment variables

    Hello, 
       1.- Is there a global variable to get the actual (project, where is DSB and DSQ files) directory? 
       2.- Is there a way to get User directory like reading enviroment variables from Operative System? 
    Thanks in advance.
    PD: I'm using Dasylab12
    Solved!
    Go to Solution.

    Yes, use System Strings
    For example, ${DATA_FOLDER}.
    The easiest way to get the list is to right click and select Global Strings. The bottom half of the dialog box lists system strings, including date, time, the name of the worksheet, with or without path, the DEFAULT folders for worksheet, data, other, black box, etc. 
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

Maybe you are looking for

  • Bean not working in 9i ids

    hello, i have a prograss bar bean class and i saved this bean in /form90/java and set the property of beans item " implement class" with this bean name but not working or display. urgent help. thanks

  • Why personal hotspot missing from Symbian!

    I don't understand why in this day and age Nokia Belle is missing a personal hotspot? Why should I buy a 3rd party app and use it if it can be tweaked into the existing software? Hello Nokia? Are you listening/reading?

  • How to setup remote web/client login to my BO XI 4.0 server in Bangalore?

    I have setup BO XI 4.0 server with Win 2008 R2 in Bangalore. But I'm not able to configure remote login to this server. For example, To connect Interactive Analysis - Desktop from a remote system to my server installed in different machine. Any thoug

  • Saving addy's to address book from websites...

    Hi all. Wondered if there is a way to save email addresses from a website. As it is now, when it shows the email address, if you click on it, it automatically emails that person. Was trying instead to save that email address to my address book, so th

  • Nokia 5800 email automatic retrieval

    Hi everyone. I am trying to set up my email so that they are retrieved automatically every 2 hours. The problem is that it works only when I set my home connection on the email account and not the default option. That means that when I am home it wor