Help regarding  a shell script

Hi,
I had a requirement to execute a long running sql query. But the sql query had some parameters to be passed in it. I want to use nohup command and run the sql script using shell script concept. How can i pass the parameters and run the nohup command. I am herewith attaching sql reference.
[http://hatchappsdba.blogspot.com/2008/01/how-to-run-rcv11isasql-type-of-files.html]
I want to keep the sql script in a shell script and run it through nohup command.
Can you please let me know how can i keep the above sql in a shell script and run through nohup command

I want to keep the sql script in a shell script and run it through nohup command.
Can you please let me know how can i keep the above sql in a shell script and run through nohup commandFrom the OS command prompt, issue:
# nohup sqlplus <username>/<password> @<script name>.sql &Or as sysdba (if sysdba is needed to run the script):
# nohup sqlplus "/ as sysdba" @<script name>.sql &Or, you can write a shell script as mentioned in this thread -- nohop sqlplus doubt
Thanks,
Hussein

Similar Messages

  • Need Help on Executing Shell Scripts through PL-SLQ

    Hi All,
    I am trying to execute a shell script from PL-SQL but I am not getting it right .
    the code i used is as follows
    ----JAVA CLASS ---
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Host" AS
    import java.io.*;
    public class Host {
    public static void executeCommand(String command) {
    try {
    String[] finalCommand;
    if (isWindows()) {
    finalCommand = new String[4];
    // Use the appropriate path for your windows version.
    finalCommand[0] = "C:\\windows\\system32\\cmd.exe"; // Windows XP/2003
    //finalCommand[0] = "C:\\winnt\\system32\\cmd.exe"; // Windows NT/2000
    finalCommand[1] = "/y";
    finalCommand[2] = "/c";
    finalCommand[3] = command;
    else {
    finalCommand = new String[3];
    finalCommand[0] = "/bin/sh";
    finalCommand[1] = "-c";
    finalCommand[2] = command;
    final Process pr = Runtime.getRuntime().exec(finalCommand);
    pr.waitFor();
    new Thread(new Runnable(){
    public void run() {
    BufferedReader br_in = null;
    try {
    br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
    String buff = null;
    while ((buff = br_in.readLine()) != null) {
    System.out.println("Process out :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    br_in.close();
    catch (IOException ioe) {
    System.out.println("Exception caught printing process output.");
    ioe.printStackTrace();
    finally {
    try {
    br_in.close();
    } catch (Exception ex) {}
    }).start();
    new Thread(new Runnable(){
    public void run() {
    BufferedReader br_err = null;
    try {
    br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
    String buff = null;
    while ((buff = br_err.readLine()) != null) {
    System.out.println("Process err :" + buff);
    try {Thread.sleep(100); } catch(Exception e) {}
    br_err.close();
    catch (IOException ioe) {
    System.out.println("Exception caught printing process error.");
    ioe.printStackTrace();
    finally {
    try {
    br_err.close();
    } catch (Exception ex) {}
    }).start();
    catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    public static boolean isWindows() {
    if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
    return true;
    else
    return false;
    ---PROCEDURE TO BE EXECUTED WHICH USES THE ABOVE JAVA CLASS IS ----
    CREATE OR REPLACE PROCEDURE Host_Command (p_command IN VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'Host.executeCommand (java.lang.String)';
    --- THE PERMISSIONS ---
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.io.FilePermission', '<<ALL FILES>>', 'read ,write, execute, delete');
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    call dbms_java.grant_permission('SYSTEM', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    --- THE SHELL SCRIPT IS -----
    #!/bin/sh
    # This script removes the carriage returns from the Files having .DAT1 extensions in the /test/ Directory
    # and the sends the single line stream to the new file with the use of 'gawk' command
    # so finaly the files with same primary name but different secondary name are created
    # e.g. file 'test.DAT1' is onverted to 'test.DAT'
    # LOOP on /test/ DIRECTORY FOR SEARCHING FILES HAVING EXTENSION *.DAT1
    for file_name in `ls /test/*.DAT1`
    do
    new_file_name=`echo $file_name | sed 's/DAT1/DAT/'`
    # SEND THE CONTAINTS OF SELECTED FILE IN LOOP AS A CONTINUOUS STREAM TO NEW FILE NAME USING 'gawk' COMMAND
    gawk 'BEGIN { ORS = "''" } { print $0 }' $file_name >> $new_file_name
    # ABOVE LINE WILL CREATE A NEW FILE WITH SAME PRIMARY NAME BUT .DAT AS SECONDARY NAME(EXTENSION)
    # REMOVE THE PRIOR FILE(s) AFTER SUCCESSFUL CALL TO 'gawk'
    # $? returns 0 if the call to gawk command is succesfull
    if test 0 = "$?"
         then
         rm -f $file_name
    fi
    done
    # END LOOP ON /test/ DIRECTORY
    ---THE CALL TO THE PROCEDURE --
    SQL>CALL DBMS_JAVA.SET_OUTPUT(1000000);
    SQL>SET SERVEROUTPUT ON SIZE 1000000
    SQL>exec host('/root/sh ecs_script.sh'); -----------------------------------------------1
    now, the statement 1 is the path of the Shell Script ecs_script.sh
    which uses gawk command and does some operations on some file..
    but when i give the call in Statement 1 its giving error like
    /bin/sh is not a directory
    so i am not getting wHat should I do so that my script "ecs_script.sh" gets executed..
    Please Help.

    @ Bhagat & Michaels
    Dear Friends,
    I changed my shell name as per ur suggestions
    and recompiled the Java class source with
    finalCommand[0] = "/bin/bash"; instead of finalCommand[0] = "/bin/sh";
    and then recompiled the host procedure
    executed the host procedure as per ur suggestion as follows (with out put)
    SQL> exec host('/bin/bash ecs_script.sh')
    PL/SQL procedure successfully completed.
    bt, bt, bt, it still did not do any operations defined in the "ecs_script.sh"
    in fact the script did nt executed.......
    pls help , I am loosing my time..
    regards.

  • Regarding the shell scripting

    Hi,
    i am working on supporting side for a migrated project.My application is an ASO.
    As i have to execute the MaxL scripts in Unix using shell scripting.
    Can any one help me out in writing and executing the scripts in Putty server.
    it is very apreciable if i get response soon to my id [email protected]
    Thanks and waiting for reply.
    Srinivas

    We are using Essbase on UNIX (AIX) too. Generally speaking, I always create 2 files when I want to execute a MaxL script on our UNIX server:
    1) a shell script, eg. proc.sh, that contains "essmsh -l <user> <password> proc.msh".
    The proc.sh file can be edited using the standard UNIS editor "vi" and needs to be executable (the "x" bit needs to be set).
    2) the MaxL script, eg. proc.msh, that contains the MaxL statements to be executed on Essbase
    Hope this helps.

  • Help on preparing shell script for setting the listener password

    Hi All,
    I am working on checking all my DB servers listeners and if the password is not set for the listener then I need to set the password for that.
    As we have many servers, I am planning to prepare the shell script for doing this task.
    I am familiar with setting up the listener password manually, but strucked up to prepare the shell script to do the same task.
    Can any one kindly help me on this.
    Thanks in advance,
    Mahi

    815537 wrote:
    Could any body please help me.
    Thanks,
    MahiPatience, Grasshopper
    This forum is not a chat line, and it is not paid support.
    No one is responsible for monitoring it and giving a quick response.
    Furthermore, it is a global forum. The person with the information you seek may very well live 20 time zones away from you and was going to bed just as you posted. He will not even see your post for several more hours.
    Your original post went up in the middle of the night for half the world.
    No one with the information you seek is deliberately withholding it until you sound sufficiently desperate.

  • Help with broken shell script

    Hi,
    We had the shell script below created for our school last year to keep the students from jumping off of our wireless network so they had to go through our content filters. We put the script on all of the student laptops (MacBooks and MacBook pros) so it ran as a process in the background. It worked beautifully for the  whole year.
    Now we are in the process of upgrading our laptops from Snow Leopard to Lion and we've discovered that the script no longer works in Lion. I am guessing it is something simple but I don't see it. Does anyone know what about the OS changed that would cause this script to stop working?
    Thanks
    Tim
    #!/bin/sh
    currentSSID=`networksetup -getairportnetwork Airport | awk {'print $4'}`
    if [ "$currentSSID" = "optimumwifi" ] ; then
            echo "Disassociating.."
            /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/ai rport --disassociate
            networksetup -setairportnetwork Airport "Student" "only4study!"
    fi
    if [ "$currentSSID" = "timewarnercablewifi" ] ; then
            echo "Disassociating.."
            /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/ai rport --disassociate
            networksetup -setairportnetwork Airport "Student" "only4study!"
    fi
    if [ "$currentSSID" = "xfinitywifi" ] ; then
            echo "Disassociating.."
            /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/ai rport --disassociate
            networksetup -setairportnetwork Airport "Student" "only4study!"
    fi

    Brilliant, that worked perfectly! Thanks for the your help Linc.
    Coincidentally, I found a posting on the website stackexchange.com that helped explain why it stopped working in the first placed and why "Airport" alone used to work in Snow Leopard.
    Note what it says at the bottom:
    "the port name is Wi-Fi on 10.7 and AirPort on 10.6. The device name can be at least en0,en1, or en2 depending on your setup."
    http://apple.stackexchange.com/questions/36891/bash-script-to-toggle-wifi-in-lio n

  • Help needed in shell script for FTPS

    Hi,
    Im trying to build a script to download files from a secure FTP site.
    When I run the command ftps <host_address> in the unix prompt, it asks username and password, and then prompts the following question.
    Do you want to trust this certificate? y(y):
    From the prompt, I am able to type 'y' and then it is connecting to the FTP site without any issue.
    When i run the shell script which contains the same command ftps <host_address>, it prompts the same question. And then it comes out of the program saying 'Connection aborted'.
    Could anyone tell me how to avoid this prompt?
    Thanks,
    Vidhya

    Ya. It worked for me when i typed the command ftps <host_address> in the command prompt.
    When I type this command, it is asking for username,pwd and after that, it is asking 'Do you want to trust this certificate?'. For this i have typed 'y' (Yes) in the command prompt.
    After i entered 'y', the connection got established properly.
    I have included this command in a shell script, and ran this script.
    When i execute the script, i asks 'Do you want to trust this certificate?'.
    Since i will not be able to type 'y'(Yes) connection is getting aborted.
    So, I want to know how to avoid this question ot how to enter 'y' while executing the script.
    Thanks

  • Need Help Writing a Shell Script

    Basically I'm writing a script that opens TextEdit so I can open it from the Terminal. I also want it to run in the background so I can continue using the Terminal without having to quit TextEdit first. So far I've figured out two ways of doing this, and neither one does exactly what I want it to do. Here's the first one I tried:
    /Applications/TextEdit.app/Contents/MacOS/TextEdit $@ &
    The problem with this is that if TextEdit is already running, it opens a new instance of it to open the files, and it doesn't bring the app into focus when I run it. So I decided to try this:
    open -a "TextEdit" $@ &
    This way all files open in the same instance of TextEdit and it brings the app to the front, but it won't let me save anything I don't have write privileges for, even if I run it with sudo. I Googled it and apparently what happens is it runs "open" as root but runs the actual application that I'm opening as the current user.
    So basically what I need to know is if there's a way of doing this that will congregate all files into the same instance of TextEdit and bring the app to the front when I launch it, but still let me run it as root with sudo. If not, is there at least a way to check if TextEdit is running and throw an error if it is?

    #!/usr/bin/env bash
    if ps ax | grep '[T]extEdit'; then
    echo "TextEdit is already running!"
    else
    /Applications/TextEdit.app/Contents/MacOS/TextEdit &
    fi
    open -a TextEdit "$@"
    osascript -e 'tell application "TextEdit" to activate'
    Example:
    your.script "text file.txt"
    NOTE 1: When posting code to this forum, enclose your code in
    ...your code goes here...
    This will make sure that all your indentation and other meta-characters that might get interpreted by the forum code will be left alone.
    NOTE 2: The $@ will ONLY preserve quoted strings as a single argument if it is specified as "$@". That is to say it MUST be inside a pair fo double-quotes. Otherwise it is the same as $* The missing ".." are what messed up your ability to treat a file with space as a single argument. ALSO NOTE, I specified the file on the command line inside quotes (could be single or double), or you could use  if you desire.
    NOTE 2 and a half:
    If you DO NOT want to put quotes around the space filled filename when invoking your script, you could change your "$@" to "$*"
    open -a TextEdit "$*"
    The difference is that using "$@" will allow specifying several filenames on the command line and TextEdit will open all of them at once. The use of "$*" means you can only open 1 file per use of your script. Not a big deal, but I figured you should know the options available to you.
    NOTE 3: I've simplified your script.
    I do not know why you decided that if you are root you wanted to use sudo, since sudo gives normal users root privileges, and root already has root privileges.
    Actually based on earlier exchanges, I would have thought that you wanted to start TextEdit using sudo, unless it was already running:
    sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit &
    so that you had root privileges allowing you to write files in places you were normally not allowed. Then again, maybe I was reading the earlier posting wrong (won't be the first time ).
    NOTE 4: The use of
    if [ "$textedit" > /dev/null ]; then
    is just plain wierd This translates to the command:
    test "$textedit" >/dev/null
    which redirects standard output into /dev/null, so the actually command looks like
    test "$textedit"
    which will essentially return TRUE if $textedit has a string in it, and FALSE if $textedit is empty.
    I decided to just use the completion status of the grep command as a way to decide if TextEdit was running on not.
    NOTE 5: I simplified the ps|grep|grep command with a trick I learned several years ago. The '[T]extEdit' regular expression exactly matchs TextEdit, except that it DOES NOT match a ps line that has '[T]extEdit'. So I can get rid of one grep command because it will never match the grep command in the ps output.
    NOTE 6: I moved the open and osascript commands outside the if structure, as I assumed you wanted osascript to bring TextEdit to the foreground regardless of whether it was already running or not, and the open command was identical for both halfs of the if structure. If this is a bad assumption, feel free do put it back inside the if structure.
    Message was edited by: BobHarris

  • Help with a shell script for schroot

    Since I replaced dchroot with schroot I have a problem.
    In /usr/bin I have a script run32.sh to run 32 bit applications, and symbolic links like acroread32 pointing to run32.sh, firefox32 pointing to run32.sh etc.
    Here is the run32.sh I had before
    #!/bin/bash
    cmd=`basename $0 | sed -n s/32//p`
    for (( i=1; $i<=$#; i=$i+1 )); do
    esc[$i]=$(sed -e 's#\([^[:alnum:]]\)#\\\1#g' <<<${!i})
    done
    exec schroot -p "$cmd" "${esc[@]}"
    The for loop is a trick I stole from the web for escaping some characters.
    But this is not working anymore with schroot.
    So I modified run32.sh like this:
    #!/bin/bash
    cmd=`basename $0 | sed -n s/32//p`
    ct=0
    arg=\"
    for i in "$@"
    do
    ct=$(($ct+1))
    if [ $ct -eq 1 ]
    then
    arg="$arg$i"
    else
    arg="$arg $i"
    fi
    done
    arg=$arg\"
    echo exec schroot -p $cmd $arg
    exec schroot -p $cmd $arg
    Notice that at the end I echo the exec command and then I execute it.
    It works fine for simple arguments, like
    acroread32 foo.pdf
    but not for composite arguments like
    acroread32 foo boo.pdf
    or
    acroread32 foo\ boo.pdf
    (this last one is when I use the tab key to complete the name of the file).
    The thing that I really don't understand is that, typing
    acroread32 foo boo.pdf
    the echoed command is
    exec schroot -p acroread "foo boo.pdf"
    and I get an error
    I: [Arch32-8398824e-10d9-4adf-a299-10c09116e262 chroot] Running command: "acroread foo boo.pdf"
    but then, if i type directly to the command line
    exec schroot -p acroread "foo boo.pdf"
    it opens the file!
    Has somebody a solution to deal both with files like "foo.pdf" and "foo boo.pdf"?

    jacko wrote:Is there any reason your choosing to use acroread over some other form of pdf viewer via a chroot?
    Usually I use kpdf but for some particular features acroread is better. But it's not the point, acroread is just an example. You can do another example with firefox 32 bit, that I use for flash and jre, and mplayer 32 bit, that I use for some win32 codecs.

  • Need a help in scheduling shell script

    I am using following script to check db status.
    check_stat=`ps -ef|grep ${ORACLE_SID}|grep pmon|wc -l`;
    oracle_num=`expr $check_stat`
    if [ $oracle_num -lt 1 ]
    then
    exit 0
    fi
    # Test to see if Oracle is accepting connections
    $ORACLE_HOME/bin/sqlplus -s "/as sysdba" > /tmp/check_$ORACLE_SID.ora <<ENDSCRIPT
    select name from v\$database;
    exit
    ENDSCRIPT
    # If not, exit and e-mail . . .
    check_stat=`cat /tmp/check_$ORACLE_SID.ora|grep -i error|wc -l`;
    oracle_num=`expr $check_stat`
    if [ $oracle_num -ne 0 ]
    then
    mailx -s "$ORACLE_SID is down!" [email protected] < /tmp/check_$ORACLE_SID.ora
    #else
    #mailx -s "$ORACLE_SID is up and running" [email protected] < /tmp/check_$ORACLE_SID.ora
    exit 16
    fi
    while executing at command prompt, it is working fine. I need to know what lines i need to add to schedule this in a crontab?
    thanks in advance

    Pavan - a DBA wrote:
    i am trying to schedule it so that it will run for every 15 min
    0,15,30,45 * * * * myscriptI don't have access to a *nix at the moment, so I may be off on the number of asterisks, but you get the idea on minutes and hours                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Shell script

    i need some help wrting a shell script in unix.
    a function would return a value. i need to capture that value and execute a sql script based on the value. something like this:
    variable x = function()
    if x>1 then @scriptfile.sh
    else exit;
    how can i put this in a shell script?

    Yes it can be done it this way, but the ENTIRE output of SQLPlus will be stored in your variable and not just the return value. This means you have to parse the variable for your return code.
    If i have to interact with the database, i usually take Perl instead of Bash. Maybe you could explain what you need to do and we try to find another way.

  • Execute Shell Script through Demantra Workflow

    Hi All ,
    Can we execute shell script from Demantra Workflow ?
    If yes where should we place the shell script file and wat should be the commandline command in the step .
    We have the Demantra installed on a windows server and the workflow manager is on a linux server .
    the batch file on the windows server can be executed through the secure shell from the linux server .
    I am trying to achieve the same through thr demantra workflow
    Appreciate any input on the same .
    Thanks and regards
    Suzy

    Hi,
    Shell script is not supported till Demantra 7.2.0.2 WF.
    I have checked with Oracle team also and reply I got below for your reference:
    QUESTION
    *=========*
    As per your details, shall we conclude like this:
    *"only *.bat and *.exe files can be used in workflow. Demantra standard functionality doe*
    *s not support shell script in workflow"*
    ANSWER
    *=======*
    Hi ,
    The Demantra standard functionality 7.2.0.2 does support shell script in workflow.
    Thanks,
    Asya
    Please review the note#468071.1-Unable to Run EBS Workflows that Call EngineManager.exe in
    You will find this note is referring to the Enhancement Request Bug 6644455-- ANALYTICAL ENGINE
    NOT AVAILABLE ON UNIX/LINUX
    But the enhancement bug exist and I hope it is fixed in Demantra 7.3.
    Tks
    MJ

  • Help regarding issue connecting to DB through shell script

    Hi,
    I have a Oracle 8.1.7 Database running on a AIX box. I am trying to truncate one table from within the shell script using here documents.
    Code section of my script -
    succ=`sqlplus -s ${USR} << EOF
    whenever sqlerror exit sql.sqlcode
    set feedback on
    Truncate table abc.xyz;
    exit;
    EOF`
    USR has been set as /. We have ops$ users in the database. So when I run this script using my id it runs fine. The problem seems to be coming when this runs as part of the batch job which runs under a different osuser. The error is -
    + + sqlplus -s /
    + 0< /tmp/sh164108.8
    succ=ERROR:
    ORA-01017: invalid username/password; logon denied
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
    where <logon> ::= <username>[<password>][@<connect_string>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    I am not sure what is going wrong. I have tried and googled for the issue and it seems that the issue is coming because the osuser under which the job runs may not be setup to use "sqlplus -s /" ? Any help appreciated.
    Regards,
    Saurabh

    This is the forum for Oracle's SQL Developer tool, not for general SQL and PL/SQL questions.Questions like this will get a better response in the PL/SQL forum.
    Having said that, it looks likely that the other user doesn't have an ops$ account.

  • Please help to call oracle procedure with out paramter from shell script

    Hi
    I want to call a process with out parameter from shell script. I am calling process in shell script in below way
    function Process_loads {
    ( echo 'set serveroutput on size 1000000 arraysize 1'
    echo "set pagesize 0 term on verify off feedback off echo off"
    echo "BEGIN"
    echo " dbms_output.put_line('Before Calling The package'); "
    echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
    echo " dbms_output.put_line('After Calling The package'); "
    echo "EXCEPTION "
    echo " WHEN OTHERS THEN "
    echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
    echo " ROLLBACK;"
    echo "END;"
    echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
    Here $error_code is out paramter. All varaibles passed in process are declared with export command.
    When executing .sh it gives below error
    "sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
    Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
    Thanks in advance

    You can try this:
    From sql*plus
    SQL> ed
      1  create or replace procedure my_proc(p_id in int, p_result out int)
      2  as
      3  begin
      4  select 10 * p_id
      5  into p_result
      6  from dual;
      7* end my_proc;
    SQL> /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2  v_r int;
      3  begin
      4  my_proc(10,v_r);
      5  dbms_output.put_line(v_r);
      6  end;
      7  /
    100
    PL/SQL procedure successfully completed.
    from bash:
    testproc.sh:
    #!/bin/bash
    (echo 'set serveroutput on';
    echo 'declare';
    echo 'v_r int;';
    echo 'begin';
    echo 'my_proc(10,v_r);';
    echo 'dbms_output.put_line(v_r);'
    echo 'end;';
    echo '/';) | sqlplus -s u1/u1
    Console:
    oracle@mob-ubuntu:~$ chmod u+x testproc.sh
    oracle@mob-ubuntu:~$ ./testproc.sh
    100
    PL/SQL procedure successfully completed.With kind regards
    Krystian Zieja

  • Passing paramter from ANT to shell script doesn't seems to work for me;Help

    Hi,
    what iam "trying" to do is to pass some variables from my ANT script to a shell script. This is what iam doing with my 3 files. Iam getting errors when iam doing this.
    1) build.xml file:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project name="dev" default="all" basedir=".">
        <!-- (2) Create the class path -->
        <path id="common.class.path">
            <pathelement
    location="/opt/bea/weblogic81/server/lib/weblogic.jar"/>
        </path>
        <!-- create a reference for the class path utilized -->
        <property file="./myAnt.properties"/>
        <property name="common.class.path" refid="common.class.path" />
        <property name="Deploy.scripts.folder" value=
    "/opt/bea/weblogic81/server/bin/applicat
    ions" />
        <property name="1" value="${ANTPATCH}" />
        <property name="2" value="${WEBLOGICJAR}" />
        <property name="3" value="${ADMINPORTNUMBER}" />
        <property name="4" value="${HOSTNAME}" />
        <target name="xyz">
            <echo message="***********deployment**********"/>
            <property name="general.deployment.script.name"
    value="${general.script}" />
        </target>
        <target name="sangitatest">
            <echo message="This is the TESTNET box"/>
            <exec dir="${Deploy.scripts.folder}"
    executable="${Deploy.scripts.folder}/${genera
    l.deployment.script.name}" />
            <arg line="${1}"/>
            <arg line="${2}"/>
            <arg line="${3}"/>
            <arg line="${4}"/>
        </target>
        <target name="all" depends="xyz,sangitatest" />
    </project>---------------------------------------
    2) myAnt.properties file:
    general.script=deployScript.sh
    ANTPATCH=/opt/bea/wlserver6.1/lib/latest_deploy.jar
    WEBLOGICJAR=/opt/bea/wlserver6.1/lib/weblogic.jar
    ADMINPORT-NUMBER1=7001
    HOSTNAME=reliant2-----------------------------------------
    3) deployScript.sh file:
    export ANTPATCH=$1
    export WEBLOGICJAR=$2
    export ADMINPORTNUMBER=$3
    export HOSTNAME=$4
    java -cp "$ANT-PATCH":"$WEBLOGIC-JAR" weblogic.deploy -port
    "$ADMIN-PORT-NUMBER" -host "$HOSTNAME" -component testMon:beamon_biko_s1 deploy
    weblogic testMon /export/home/san5sxs/applications/beamon/myfile.war-------------------
    and the Exception is:
    [echo] This is the TESTNET box
    [exec] /opt/bea/weblogic81/server/bin/applications/deployScript.sh: ANTPATCH=: is not an identifier
    [exec] Result: 1
    BUILD FAILED
    file:/opt/bea/weblogic81/server/bin/build.xml:30: Could not create task or type of type: arg.
    Ant could not find the task or a class this task relies upon.
    any help in this matter ??
    regards,
    sangita

    Have you looked at [url http://ant.apache.org/]ant's website
    That's apache's ant. I'm not sure if there are others or not.
    if so, here is the mailing list [url http://ant.apache.org/mail.html]info

  • Help Read:shell script using CONCSUB utility

    I have a shell script that will re registered as a conc prgm and then this shell script will inturn call another CONC PGM which is a report. Due to some secuirty issues we have to do this way,
    But my problem is the Printer parameters that are passed on to the shell script need to be passed to the conc pgm which generates the report..
    Plzz help me .. this is the code that calls the CONC PGM , which is a report
    NMHR_REQUEST_ID=`echo $FCP_LOGIN | cut -d"/" -f2 |
    CONCSUB APPS "$RESP_APPL_NAME" "$P_RESP_NAME" $USERNAME WAIT=Y CONCURRENT $APPL_NAME '"TAX_EXEMPT"' "$P_LOCATION"` PRINTER='"$VAL_PRINTER"' NUMBER_OF_COPIES='"$VAL_NOC"' PRINT_STYLE='"$VAL_PRINT_STYLE"' LANGUAGE='"$VAL_LANGUAGE"'
    Plzz help. if there is anything wrong..
    Thanks in advance..

    Hi,
    Following is the sample for using printer setting.
    CONCSUB apps/apps
    SYSADMIN "System Administrator" SYSADMIN
    WAIT=Y
    CONCURRENT FND FNDSCARU
    LANGUAGE=FRENCH
    PRINTER=hplj4l
    NUMBER_OF_COPIES=1
    PRINT_STYLE=LANDSCAPE
    What is the error message?
    Regards
    Prashant Pathak

Maybe you are looking for

  • How can I turn off my smart lock on ios7 when it's not in settings general?

    Hi, I am in need of help from some one who can tell me what is wrong with my IPad 2. My lock button stopped functioning after screen replacement and it does not lock the iPad unless the smart lock if off in the settings. I can perform other actions s

  • Apple TV - Wrong Language set-up

    While doing the Apple TV (2) setup I inadvertently clicked-on French language.  I wanted Eng. is there a fix?

  • Sap bw abap code meaning

    Hello, Can someone please explain what below code do? Is this deleting records from loading into transfer structure?  This was added in the start routine of transfer rule for Purchasing ODS. APPEND LINES OF DATAPAK TO I_DATAPAK DELETE I_DATAPAK WHERE

  • Effects not showing in timeline

    Hi When i'm color correcting a clip, it's seen in the user. But when Im putting into the timeline the effect is not showing. if I now right click at an view it in the viewer the effects is no longer shown. All though you can see the settings it won't

  • Create a business model when we have only one source table

    Hi, How to create a business model when we have only one source table in Physical layer Regards Swathi