Execute txkWfClone.sh in a shell script

We have a requirement that needs txkWfClone.sh to run inside a shell script (unix). We need to pass the username/password in the shell script. Basically we need to run this as a silent process.
Any suggestions on how to accomplish that?

900441 wrote:
We have a requirement that needs txkWfClone.sh to run inside a shell script (unix). We need to pass the username/password in the shell script. Basically we need to run this as a silent process.
Any suggestions on how to accomplish that?Yes.
How to Change the System Name in Workflow? [ID 387337.1]
Txkwfclone.Sql Script Is Receiving The Parameters In Incorrect Order [ID 880264.1]
You may also view the script and you will find if any parameters need to be passed.
Thanks,
Hussein

Similar Messages

  • Executing native library under Java - shell script problem

    I am running a Java application on the command line bash shell. I have a few JAR files in the directory and a few native libraries. When I run the application using the command line, all works fine. This is the command I use:
    java -classpath MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainThis works fine and the application starts up as expected. LWJGL native library is loaded in and works fine as expected.
    The problem occurs when I try to run this command via the shell using a shell script. Here is my script:
    #!/bin/bash
    # Set the minimum and maximum heap sizes
    MINIMUM_HEAP_SIZE=768m
    MAXIMUM_HEAP_SIZE=1024m
    if [ "$MYAPP_JAVA_HOME" = "" ] ; then
        MYAPP_JAVA_HOME=$JAVA_HOME
    fi
    _JAVA_EXEC="java"
    if [ "$MYAPP_JAVA_HOME" != "" ] ; then
        _TMP="$MYAPP_JAVA_HOME/bin/java"
        if [ -f "$_TMP" ] ; then
            if [ -x "$_TMP" ] ; then
                _JAVA_EXEC="$_TMP"
            else
                echo "Warning: $_TMP is not executable"
            fi
        else
            echo "Warning: $_TMP does not exist"
        fi
    fi
    if ! which "$_JAVA_EXEC" >/dev/null ; then
        echo "Error: No Java environment found"
        exit 1
    fi
    _MYAPP_CLASSPATH="MyGame.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar"
    _VM_PROPERTIES="-Djava.library.path=\'lwjgl/native/linux\'"
    _MYAPP_MAIN_CLASS="com.mygame.Main"
    $_JAVA_EXEC -classpath $_MYAPP_CLASSPATH $_VM_PROPERTIES -Xmx${MAXIMUM_HEAP_SIZE} -Xms${MINIMUM_HEAP_SIZE} -ea $_MYAPP_MAIN_CLASSThe shell script is in the same directory as the JAR files (the same directory where I ran the Java command above). When I execute the shell script ( sh MyGame.sh ), I get the UnsatisfiedLinkError message:
        14-Feb-2011 19:46:28 com.wcg.game.DefaultUncaughtExceptionHandler uncaughtException
        SEVERE: Main game loop broken by uncaught exception
        java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
           at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
           at java.lang.Runtime.loadLibrary0(Runtime.java:823)
           at java.lang.System.loadLibrary(System.java:1028)
           at org.lwjgl.Sys$1.run(Sys.java:73)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
           at org.lwjgl.Sys.loadLibrary(Sys.java:82)
           at org.lwjgl.Sys.<clinit>(Sys.java:99)
           at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
           at com.jme.system.lwjgl.LWJGLDisplaySystem.setTitle(LWJGLDisplaySystem.java:118)
           at com.wcg.game.WcgStandardGame.initSystem(WcgStandardGame.java:287)
           at com.wcg.game.WcgStandardGame.run(WcgStandardGame.java:185)
           at java.lang.Thread.run(Thread.java:662)I don't understand what I am doing wrong. I am executing the exact same command via a shell script and it is not working. Any ideas, solutions, most welcome.
    I am running Linux Mint Debian 201012, Linux mint 2.6.32-5-amd64 #1 SMP Thu Nov 25 18:02:11 UTC 2010 x86_64 GNU/Linux. JDK is 1.6.0_22 64-bit. I have 64-bit .so files in the correct place too.
    Thanks
    Riz

    Thanks for the replies guys/gals.
    I have modified the script and echoed my command that should be running under the shell script, it is:
    java -classpath WcgFramework.jar:WcgPocSwordplay.jar:log4j-1.2.16.jar:jme/jme-colladabinding.jar:jme-audio.jar:jme-awt.jar:jme-collada.jar:jme-editors.jar:jme-effects.jar:jme-font.jar:jme-gamestates.jar:jme-model.jar:jme-ogrexml.jar:jme-scene.jar:jme-swt.jar:jme-terrain.jar:jme.jar:jogl/gluegen-rt.jar:jogl/jogl.jar:jorbis/jorbis-0.0.17.jar:junit/junit-4.1.jar:lwjgl/jinput.jar:lwjgl/lwjgl.jar:lwjgl/lwjgl_util.jar:lwjgl/lwjgl_util_applet.jar:swt/windows/swt.jar:jbullet/jbullet-jme.jar:jbullet/asm-all-3.1.jar:jbullet/jbullet.jar:jbullet/stack-alloc.jar:jbullet/vecmath.jar:trove-2.1.0.jar:sceneMonitor/jmejtree_jme2.jar:sceneMonitor/propertytable.jar:sceneMonitor/scenemonitor_jme2.jar:sceneMonitor/sm_properties_jme2.jar -Djava.library.path="lwjgl/native/linux" -Xmx1024m -Xms768m -ea com.mygame.MainI am more confident that now the shell script should be fine (I am a shell script noob) because this very command if I copy from terminal and paste into the terminal, runs the application no problem at all. But I am amazed that it is still not working. I must be doing something obviously wrong. :-(
    I used the code as suggested:
    _VM_PROPERTIES='-Djava.library.path="lwjgl/native/linux"'I am stumped!? :-(
    Thanks for help.

  • Execute stored procedure from Unix shell script

    My current method of executing stored procedures (wpl_1 and wpl_2) from a unix shell script is as follows:
    <<wpl.sh>>
    sqlplus user/password @/home/oracle/scripts/wpl.sql
    <<wpl.sql>>
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    Question: Is it possible to combine the two scripts (unix and oracle) together?

    A little rusty on this, but this may work:
    My current method of executing stored procedures
    (wpl_1 and wpl_2) from a unix shell script is as
    follows:
    <<wpl.sh>>sqlplus user/password @/home/oracle/scripts/wpl.sql << EOF
    set serveroutput on size 1000000
    set timing on
    execute wpl_1('0000010676','~')
    execute wpl_2('0000010676','~')
    execute wpl_1('0000010236','FIX')
    execute wpl_2('0000010236','FIX')
    exit
    EOF
    >
    Question: Is it possible to combine the two scripts
    (unix and oracle) together?

  • Executing crystal reports through a shell script

    We are currently in the processing of building a POC using Crystal reports and was hoping to find a way to execute canned crystal reports via a shell script. The reason being we wanted to schedule the executing of the report through our scheduler where we would build in the dependencies.
    Does anyone have a simple example on how to do that.

    What sort of shell script? Can you provide more info?
    The only CR SDK is for .NET and Java.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Executing set of procedures from Shell script.

    Hi,
    I've set of procedures which i need to pass a parameter from the os ..like this.
    For table XXX ...i need to call
    a Procedure XXX ('parameter as file name ')..
    So i've a test.sql file which is calling
    EXEC XXX(&1);
    The Shell script file will be like this...
    sqlplus username/password @test.sql
    Like this i need to call 10 tbles.
    so 10 sql file and 10 shell script file.
    And also i need to scedhule the *.sh file.
    Is that a right way ....? or any other method to achive this ????
    IT'S URGENT...
    Thanks

    Hi,
    Make a file proc.txt containing the name of the proc :
    proc1
    proc2
    proc3
    A second file for the tables names tables.txt containing :
    table1
    table2
    table3
    And the shell will be :
    #!/bin/bash
    TAB=tab.txt
    PROC=proc.txt
    for THE_TABLE in `cat $TAB`
    do
    for THE_PROC in `cat $PROC`
    do
    sqlplus system/manager <<!
    exec $THE_PROC ;
    exit ;
    done
    done
    Fred
    ~
    ~

  • R/3 to other oracle system Unix Shell scripts Execute

    Hi,
    Here SAP 4.7 version, is it any possibility to run/execute other oracle system Unix shell scripts from sap program?
    With Regards,
    Anil

    ...yes,
    1.define own external command (sm69)
    2. run this command from your ABAP code by callig function module SXPG_COMMAND_EXECUTE
    regards,darek

  • Execute worflow from shell script

    hello all, i have to execute a workflow from a shell script, somebody know how can i do? . thanks for your help!!!!

    hello all, i have to execute a workflow from a shell script, somebody know how can i do? . thanks for your help!!!!

  • Passing a FILENAME from a LINUX SHELL Script to an SQLPLUS Script

    I written a LINUX Shell Script to receive a FILENAME. This FILENAME is the name of the file that I want to SPOOL into.
    So, below are two items.
    The first item is the LINUX Shell Script that has the FILENAME
    The last item is the SQLPLUS Script that is suppose to receive the name
    The LINUX Shell Script:
    #! /bin/sh
    LOGFILE="$(date +"%Y-%m-%d %H:%M") Oracle REPORT LOG.TXT"
    FILENAME="$(date +"%Y-%m-%d") PROD Unfinished Spot Bids.CSV"
    echo "File Name for the spool is:" "$FILENAME"
    #spool "$FILENAME"
    #sqlplus /nolog @run_test_query.sql
    #sqlplus -S @Unfinished_Spot_Bids_Run_V1.sql >$LOGFILE
    sqlplus -S /nolog <<EOF >$LOGFILE
    /* I want to pass to the SQL file below */
    /* The value that is contained in the the variable $FILENAME */
    /* How do you do that? */
    @@Unfinished_Spot_Bids_V1.sql
    spool
    set echo on
    EOF
    RV=$?
    #if {$RV -ne 0}
    #exit $RV
    #else
    echo "The return code fronm the sqlplus was:" "$RV"
    #fi
    Here is the SQLPLUS Script
    CONNECT glog_read/parker@OTMPROD
    set linesize 32000 trimspool on pagesize 3000
    set echo off
    SET TERMOUT OFF
    set heading off
    /* I want to parameterize the name of the file below */
    /* This file is executed from inside a LINUX Shell Script */
    /* That LINUX SHELL script is passed a file name */
    /* I want that filename used in the "SPOOL" statement below */
    /* So, how do I do that? */
    spool PROD_Unfinished.CSV
    prompt Shipment Update Date|Shipment Number|No of Shipments|Auctions per Shipment|No. of Carriers Notified|No of Bidders|Duration of Auction|Elapse time for first bid|Elapse time for last bid|Elapse time of bidding|Lead Time of Auction to P/U|High Bid- Low Bid Diff|
    set feedback off
    SELECT
    to_char(c.update_date, 'FMMonth, YYYY')||'|'|| b.SHIPMENT_GID
    ||'|'|| count (distinct (b.SHIPMENT_GID))
    ||'|'|| count(distinct(a.i_transaction_no))
    ||'|'|| count(*)
    ||'|'|| sum (case when a.responding_gl_user_gid is null then 0 else 1 end)
    ||'|'|| min (numtodsinterval((b.expected_response - b.insert_date),'day'))
    ||'|'|| min (numtodsinterval((a.update_date - a.transaction_time),'day'))
    ||'|'|| max (numtodsinterval((a.update_date - a.transaction_time),'day'))
    ||'|'|| numtodsinterval((max(a.update_date) - min(a.update_date)),'day')
    ||'|'|| numtodsinterval((max(b.shipment_time) - max(c.insert_date)),'day')
    ||'|'|| (max(a.bid_amount) - min(a.bid_amount))
    from tender_collab_servprov a, tender_collaboration b, shipment c
    where a.i_transaction_no = b.i_transaction_no
    and b.shipment_gid not in (select sqa.shipment_gid from tender_collaboration sqa, tender_collab_servprov sqb where sqa.i_transaction_no = sqb.i_transaction_no and sqb.acceptance_code = 'A')
    and a.i_transaction_no in (select i_transaction_no from tender_collaboration where tender_type = 'Spot Bid')
    and b.shipment_gid = c.shipment_gid
    AND c.update_date >= trunc(last_day(to_date((to_char(add_months(SYSDATE,-2), 'MM-DD-YYYY')),'MM-DD-YYYY')) + 1)
    group by c.update_date, b.SHIPMENT_GID
    order by c.update_date, b.shipment_GID;
    spool off

    ParadicePGMR wrote:
    First, I was getting an error on the SPOOL ${FILENAME}. Also, my file did have spaces and I did replace it with "_". It still did not work on the SPOOL Command. So, with or without the _, I never got the SPOOL command to work!
    It seems that the FILENAME value from the LINUX script was not being passed into the SQLPLUS procedure.
    How do you pass LINUX variables into the SQLPLUS procedure>
    Not sure if I had the right usage => ${FILENAME}above is correct syntax

  • 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
    $                                                                           

  • Issues with shell script

    Hi,
    I am executing on procedure using the shell script. The Shell script would the spool the output of the procedure into Status.txt file and send the condents through the mail. I am getting correct output when i run the job manually. But it is not giving the output when the job is scheduled in Crontab. Please find the below my shell script.
    ORACLE_SID=ora
    export TNS_ADMIN=/oracle/11.2.0/network/admin
    export ORACLE_HOME=/oracle/11.2.0
    export PATH=/oracle/11.2.0/bin:$PATH
    export LIBPATH=/oracle/11.2.0/lib32:$LIBPATH
    sqlplus -s test/test@test << EOFSQL
    SET HEAD off
    SET LINESIZE 8000
    SET feedback OFF
    SET pagesize 0
    SET termout OFF
    SET SERVEROUTPUT ON
    SPOOL Status.txt
    begin JobStatus();
    end;
    SPOOL off
    SET termout ON
    exit;
    EOFSQL
    TO='EmailID'
    file=/myFolder/Status.txt
    cat $file|mailx -s "Status" ${TO}

    The only PATH a user cron job knows by default is "/usr/bin" and "/bin", hence it won't find any Oracle applications. ORACLE provides a tool named "oraenv" to setup the required Oracle shell environment. oraenv reads /etc/oratab to setup $ORACLE_HOME, etc. It is by default installed in /usr/local/bin. The following example should work:
    #!/bin/sh
    # Filename: /home/oracle/scripts/sqlplus_sample.sh
    # Author: dude
    PATH=/usr/local/bin:$PATH
    export $PATH
    ORACLE_SID='orcl'
    ORAENV_ASK=NO
    . oraenv -s
    oradate=`sqlplus -s /nolog <<-EOF
      set pages 0 feed off
      connect / as sysdba
      select sysdate from dual;
    exit
    EOF
    `
    echo "`date`: Oracle $oradate" >> /tmp/sqlplus_sample.output
    [oracle@vm10]$ chmod 755 /home/oracle/scripts/sqlplus_sample.sh
    [oracle@vm10]$ crontab -l
    * * * * * /home/oracle/scripts/sqlplus_sample.sh
    [oracle@vm10]$ cat /tmp/sqlplus_sample.output
    Mon Dec 12 11:27:01 CET 2011: Oracle 12-DEC-11
    Mon Dec 12 11:28:01 CET 2011: Oracle 12-DEC-11
    Mon Dec 12 11:29:01 CET 2011: Oracle 12-DEC-11
    Mon Dec 12 11:30:01 CET 2011: Oracle 12-DEC-11Btw, exporting a shell variable means to make it available to sub-shells or child processes.
    Also, depending on how you connect, you don't need to export TNS_ADMIN. If you establish a local connection you will be connecting to the oracle database process directly using the BEQ protocol, in which case you don't even need a listener process running. For instance:
    $ lsnrctl status
    LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 12-DEC-2011 12:10:29
    Copyright (c) 1991, 2010, Oracle.  All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
      TNS-00511: No listener
       Linux Error: 111: Connection refused
    $ sqlplus scott/tiger
    SQL*Plus: Release 11.2.0.2.0 Production on Mon Dec 12 15:05:57 2011
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options

  • Output format of sqlplus commands under shell script

    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok.
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?
    Thanks a lot.

    user9357436 wrote:
    hi experts
    Can you help with some problems please?
    1.) I try to run shell script from dbms_scheduler, which runs sqlplus and the output of sqlplus commands is written to file using command spool. To this point everything is running ok. then why are you here?
    My problem is, that output of this file is: (e.g.)
    SQL> PROMPT ****************USERB******************
    ****************USERB******************so remove PROMPT line from the file
    >
    SQL> --SELECT sid
    SQL> -- FROM v
    SQL> -- WHERE audsid = SYS_CONTEXT('userenv','sessionid');
    But I don't want the whole first line in the output file. I only want the output of this command, like on the second line.
    2.) How Can I write two outputs from sqlplus using command spool running at the same time into one file?you can not do so.
    Like in first issue described above. The main sqlplus create a job and this execute the background sqlplus using shell script. But both, the main and the background sqlplus are written to output file at the same time. But only one is written into. But I want the both outputs in the file.
    How Can I do that, if I can?Can't.
    Now what?
    >
    Thanks a lot.Why using DBMS_SCHEDULER to invoke OS script to run sqlplus that runs SQL statements?
    this is like making THREE Left Turns, instead of single Right Turn.
    Just invoke PL/SQL procedure that does what needs to be done.

  • Which .bash does "do shell script" commands use?

    The "do shell script" command uses the Bourne shell "sh". But I am curious to know which .bash it uses to define the shell environment variables.
    I ran into a problem installing a third-party unix program which required new environment variables to be defined in order to execute. Defining these variables and executing this program from the terminal worked fine.
    But executing it within a "do shell script" command in an Applescript - the program died silently because the environment variables it required were not defined in the shell Applescript uses. It appears to invoke a new shell which does not inherit the environment variables defined in your home user shell.
    (I found this out by 'do shell script "set"' which listed the environment variables Applescript knows about - the ones I defined for the third-party program were not listed).
    A "brute force" way of fixing this is to pass the environment variables directly:
    do shell script "export THIRDPARTY_ENVVAR=blah; /usr/sbin/thirdpartyprogam"
    This works but not exactly elegant, particularly when you need to pass a number of variables.
    So - any better ways to do this? Can I edit the .bash Applescript uses, and where is it?
    Thanks.

    Another option that might work for you... if you are saving/distributing your AppleScript as an "Application bundler" is to group all your shell env. variables and other commands into a separate shell script file. Then include the shell script inside your app bundle. Locate the shell script at runtime and run that with "do shell script".
    For example, create "myShellScript.sh"
    #!/bin/sh
    export THIRDPARTY_ENVVAR=blah
    # ... more variable declarations..
    /usr/sbin/thirdpartyprogam
    # ... more shell commands...
    Store the shell script file inside your AppleScript bundle's Contents -> Resources folder (remember to make the shell script executable). Then your AppleScript can find your shell script at runtime and execute it like this:
    set ssPath to quoted form of POSIX path of (path to resource "myShellScript.sh")
    set stdout to do shell script ssPath
    Steve

  • Shell Script Resource-Timeout error

    Hi!!
    I have an issue with the Shell Script Resource, the problem is as follows:
    When I created a user in this resource and appears a error message:
    com.waveset.util.WavesetException: An error occurred adding user 'user01' to resource 'Shell Script'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
    I added the timeout property = 300 000 in my shell script is as follows:
    <ResTypeAction restype='Shell Script' timeout='300000'>
    but it doesn't work.
    I had the IDM 8 with the patch 4 but the problem beging when I did upgrade to patch 4 to 6.
    Does anyone knows what could be the problem.
    Thanks in advance!

    Hello!
    That isn't the problem the test connection works fine but when I try provisioning a user the shell script execute some instructions, in the shell script I need to set the timeout property in order to give more time to finish execute the instructions before the script execute the following command.
    I tested the timeout property in the shell script and work to fine for IDM 8 patch 4 I upgrade to patch 10 and stopped to work.
    Does anyone knows What could be the rigth way to set the timeout property in a resource action for shell script resource?
    Thanks...

  • Rwcgi60 on UNIX needs shell script ?

    I am trying out Reports 6i on a Linux box.
    Using Apache Webserver, I have mapped all the virtual directories with execute permission.
    When I call rwcgi60 through the browser, I get the following output
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <CENTER><H1>
    </CENTER></H1>
    <BR></BODY>
    </HTML>
    But when i call a shell script (which in turn calls rwcgi60) through the browser, i get some output.
    The shell script exports all the environment specific to Oracle Reports and calls rwcgi60.
    Is the CGI intended to be called from a script file ? If no, what other configuration is necessary ?
    Thanks.

    I am having exactly the same problem on Solaris. The information I have shoehorned out of support so far is that you do need a shell script to make this work. I have followed these instructions but am still having problems. The document which details this bug is unpublished by Oracle so I only got extracts. Detailed below.....if you do have success with this please let me know as I am tearing my hair out.
    REPORTS60_SERVER
    1. The REPORTS60_SERVER file is located in your Oracle_Home and is used to
    start the Report Server.
    2. You may need to modify this file for variables such as DISPLAY, TNS_ADMIN
    and the REPORTS60_PATH to fit your environment. @Also, please refer to
    @Note: 111548.1 for setting up the TNSNAMES.ORA file.
    3. If you are not using a WebDB Listener, you can delete the section which
    stops and starts it. However, make sure you have started up your Webserver
    Listener.
    4. Once this file has been modified, the command to execute it is:
    reports60_server start
    Shell Script (RUNREP.SH)
    1. You will need to create a shell script to run RWCGI60. This shell will then
    be called from RUNREP.HTM file. You can name it anything (the example is
    called runrep.sh) and needs to include the following:
    #!/bin/sh (or which ever shell you want to use)
    - ORACLE_HOME="/u03/app/oracle/product/dev6i"; export ORACLE_HOME
    - TNS_ADMIN="/u03/app/oracle/product/dev6i/network/admin"; export
    TNS_ADMIN
    - exec /u03/app/oracle/product/dev6i/tools/web60/cgi/rwcgi60
    2. You will need to redefine the ORACLE_HOME and TNS_ADMIN due to BUG:1201156.
    3. This script can be located anywhere as far as the Webserver
    Listener is
    concerned. However, the best place would be in the ORACLE_HOME/tools/web60/
    cgi directory for which we already have a virtual name defined in the
    listener configuration file.
    RUNREP.HTM
    1. The RUNREP.HTM file is located in the ORACLE_HOME/tools/web60/html
    directory.
    2. You will need to modify this file due to the above mentioned Bug.
    Go to the function called runReport( ) and for the var cgiexe = "rwcgi60",
    replace it with the above shell script.
    Example: var cgiexe = "runrep.sh"
    3. Next, modify the port number for the Webserver. This file assumes that you
    will be using the WebDB listener and is installed on port 8080 (by default).
    You will need to find the following and change it to the correct port
    number:
    <td><input TYPE="TEXT" NAME="WEBPORT" SIZE="4" VALUE="8080"></td>
    Change the Port Number to the one your WebServer Listener is on, such as:
    7777.
    After doing all of the above, you are ready to run a report on the web using
    CGI implementation. From the browser run the following URL:
    http://your_machine_name:listener_port#/virtual_dir_for_cgi/runrep.htm
    This brings up a Template for you to provide the report name. Also change the
    parameter values here for the userid/password, port#, and reports_server.

  • Error Handling with sql *plus from a shell script

    When I execute sql plus in a shell script with the wrong username/pass pair, the shell script hangs without terminating. What is the proper way to execute sql plus in a shell script that will catch a login failure and make sure the script doesn't hang?
    Example:
    We execute the following in our shell script:
    sqlplus ${ORACLE_INST} @./sql/ftp_ledger_put.sql
    Now if somebody comes along and alters the login then the script would hang. Is there a way to have the script exit gracefully?

    Not the most elegant solution but.......
    sqlplus &lt;&lt;EOD 2&gt;&1 &gt;some_log_file
    user/pwd
    @somescript
    exit
    EOD
    Because sqlplus allows for 3 tries at log in if user/pwd is not valid it will try to use subsequent lines. Each will fail.
    You have to look in some_log_file to determine success/failure
    Ken

Maybe you are looking for