Shell script error: EXPECTED integer

Hello

I have a shell script:

If test $#-No 3

then

echo "error: Incorrect number of parameters.

echo "use: install.sh fist_day_of_the_month user pass.

ECHO «»

Output 1

FI

#pas 1

sqlplus-s $2 / $3 @pas1.sql $1 > > $0.log;

#verificare lame date

User = $2

passdb = $3

get_Count () {}

sqlplus-s ${user} / ${passdb} < <!

set the position

Set feedback off

set pages 0

SELECT COUNT (TI. CUSTOMERID)

OF MBTIBUSER. TEMP_IB TI, MBTIBUSER. TEMP_MB TM

WHERE TI. CUSTOMERID = TM. CUSTOMERID

AND TI. REGULARFEEFORIB_AC IS NULL

OR TI. INITIALFEEFORIB_AC IS NULL

OR TM. INITIALFEEFORMOBILE_AC IS NULL

OR TM. REGULARFEEFORMOBILE_AC IS NULL

Group 1;

!

}

Count = $(get_Count)

echo $count

If ["$count" - gt 0]; then

echo ' STOP! "Nu exista curs valutar pentru ultima zi a lunii of billing.

sqlplus-s $2 / $3 @STOP.sql > > $0.log;

on the other

echo 'OK '.

FI

I got the error "'integer should ' on the line: If ["$count"- gt 0];" then

Do you have any ideeas?

Thank you

Claudiu

I got the error "whole expression should" on the line: If ["$count" - gt 0]; then

Remove the quotes from $count

If [$count - gt 0]; then

Tags: Database

Similar Questions

  • EPub RoboHelp 8 script error - ' expected:;

    Yesterday, I downloaded the ePub for RoboHelp 8 script. (We have RoboHelp 9.) I was able to import the script and get 7za in the default location, so I didn't have to change the script file, but when I try to run the script, I get this error:

    Expected:;

    I tried Debug in the script editing window and find that it gives the same error and highlights this line:

    Date: Wednesday, December 7, 2011 15:27:25-0600

    The entire line is highlighted in the storm, but Dec is specifically highlighted in blue. Any ideas as to why I get the error message and cannot run the script?

    Thank you

    Tammy

    I found the problem, which is found in how I saved the downloaded file. If the problem was me, not the script. Sorry!

  • Shell script error

    isitpasrd03 {icfgtst2} / opt/apps/oracle > cat text.sh
    #! / bin/ksh
    Value1='/apps/opt/Oracle/product/10.2.0/bin/sqlplus-silencieux / as sysdba < < END
    set pagesize 0 feedback off verify off position off off echo
    Col TIME_TAKEN_DISPLAY to a10
    Col INPUT_BYTES_DISPLAY to a10
    Col OUTPUT_BYTES_DISPLAY to a10
    Select value start_time, end_time, output_device_type, input_type, status, time_taken_display, input_bytes_display, output_bytes_display from v$ RMAN_BACKUP_JOB_DETAILS where to_date (Start_time, 'DD-MON-YY') = to_date(sysdate,'DD-MON-YY');
    `

    echo '$VALUE1 '.


    isitpasrd03 {icfgtst2} / opt/apps/oracle > sh text.sh
    Select value start_time, end_time, output_device_type, input_type, status, time_taken_display, input_bytes_display, output_bytes_display V where to_date (Start_time, 'DD-MON-YY') = to_date(sysdate,'DD-MON-YY')
    *
    ERROR on line 1:
    ORA-00942: table or view does not exist


    I don't understand what's wrong... can someone help me on this pls...

    Use this code:

    #!/bin/ksh
    VALUE1=`/apps/opt/oracle/product/10.2.0/bin/sqlplus -silent / as sysdba <
    
  • Conditional Script error map FDM

    Hi all

    We can import the data of EBS to HFM however ERPI using FDM.

    We used conditional Basic scripts of the ebs to FDM data import.

    This scripts used in FDM for PEAK dimension between the logic of script.script conditional mapping is a particular account are linked to accounts of Intercomapny transactions we have member of PCI card

    can someone help me on this:

    It is error:
    * Start the journal entry for the Runtime Error FDM [2011-12-12 15:10:18] *.
    -------------------------------------------------------------
    ERROR:
    Code............................................. 1014
    Description... Card conditional Script error: expected "End" to line (2)

    Script:
    If varValues (14) = "113401" then Result = "21_ADNIP."
    Another result = "[ICP NO] '"
    End if
    Rule = I1

    Process... clsImpProcessMgr.fLoadAndProcessFile
    The component... upsWObjectsDM
    Version.......................................... 1112
    Thread........................................... 13888

    IDENTIFICATION:
    User............................................. admin
    Name of the computer... ADNIPHYPUAT01
    App Name......................................... FDMHFM
    Client App....................................... WebClient

    CONNECTION:
    Provider......................................... ORAOLEDB. ORACLE
    Database server...
    Name of the database... HYPUAT
    Trust connect... Fake
    Connect status... Open connection

    GLOBALS:
    Location......................................... HFMGLLOAD
    Location ID... 750
    Location Seg... 4
    Category......................................... WLCAT
    ID of the category... 12
    Period........................................... May - 2011
    Period ID........................................ 31/05/2011
    POV Local........................................ Fake
    Language......................................... 1033
    User Level....................................... 1
    All Partitions... True
    Is Auditor....................................... Fake


    Thank you.
    Srini

    Hi, please try the mapping script again have the "result =" statement on a new line, as:

    If varValues (14) = "113401" then
    Result = "21_ADNIP."
    On the other
    Result = "[ICP NO] '"
    End if

    Kind regards
    Jeroen

  • SYNTAX (OBJECT EXPECTED) SCRIPT ERROR

    I get this error for several weeks now. Syntax Script (WHEREAS OBJECT) error only when I connect to Rhapsody.  I get it on my xp and windows 7 Home premium.  I have already disabled the debugging and error messages and nothing seems to work.  Help, please!

    Hi dd39525,

    · What version of internet explore on your computer?

    · Give us the complete error message?

    · Have you installed the latest version of java on your computer?

    If you use Internet explorer, then you can follow the steps in the link below and check off the results: how to resolve script errors in Internet Explorer on Windows computers: http://support.microsoft.com/kb/308260

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • "" Warning someone can give me the 'formula' for pogo to get rid of windows ' script error object EXPECTED "?

    Hello, I tried to play pogo free games and every time I get a game started this waring returns. I asked this question before but I am affarid to try the body of suggestions that they involved a buch of changes to my computer script parameters. So I thought that if I had a formula to do this step by step I could try that. I have windows 7 and you are using internet explorer 8 I have a toshiba pc Home premium 32 bit pc wi - fi.

    Thank you everyone

    BT

    Hi BertSD,

    I see that you want a formula to get rid of the script error while trying to play pogo games online. I'll help you with this problem.

    1. what security software is installed on the computer?

    2. have you made changes on the computer recently?

    3 is the issue limited to pogo games online on Internet Explorer?

    4 are you able to play pogo online game using another browser?

    Method 1.

    I suggest you follow the steps in this article.

    The problems of games online using Internet Explorer: http://support.microsoft.com/kb/2528246

    Method 2.

    I suggest you follow the steps in this article.

    How to resolve errors from script in Internet Explorer: http://support.microsoft.com/kb/308260

    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable the antivirus software. If you need to disable temporarily to install other software, you must activate it as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 3.

    You can try to reset the Internet Explorer default settings and check.

    How to reset the settings for Internet Explorer: http://support.microsoft.com/kb/923737

    Warning: him reset Internet Explorer settings feature might reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings.

    Let us know if you need assistance with any windows problem. We will be happy to help you.

  • CDF to run commands / Shell scripts

    Hi friends,

    I need help serious here regarding the CDF function.

    I created a JAR file to run batch/shell scripts via the calculation script.

    I tested the JAR file and it works perfectly well that run without the calculation script, but I get errors including in Calc script, I get the error message.

    Initially, the error was: error of Machine virtual Java and later, it is class not found.

    Here are the steps to register the CDF:

    1. place the JAR file in the location: E:\Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\udf\

    2. update the file udf.policy with the following statement:

    Grants all permissions to BatEx

    give the code "file:${essbase.java.home}/BatEx.jar" {}

    permission java.security.AllPermission;

    };

    3 restart the Essbase services.

    4. I am trying to create this function at Global level so no mention is not the name of the Application in the MaxL at registration:

    create or replace function '@BatEx' as

    "BatEx.

    Spec '@BatEx(Complete path in double quotes) '.

    Comment "Functions A CDF that runs the batch file in Essbase Server";

    5 this is the calc script:

    @BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat '; -It gives an error: error: invalid syntax 1012000 - not a command CALC [@BatEx]

    I tried another way:

    RUNJAVA @BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat '; -Gives an error: problem running [@BatEx 'E:/Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat']: [can't find @BatEx class]

    Where I am wrong here? Please help me out here.

    Kind regards

    RB

    Thanks much Amit and Jake! I finally cracked!

    Sad thing is that I have found no OTN correct information regarding function Java Custom, rather there was a lot of information about CDFs pre-existing provided by Oracle, so I decided to write a complete solution of CDF, where Java code too was created by the developer of Essbase applications.

    The requirement that I had was to trigger the batch file in the calculation script. Here is the detailed requirement:

    Update Variable of Substitution by planning web form.

    1. the user enters the data in the form of the planning web and saves it.

    2. the calc script attached to the web form, extracts data and records the flat file on Essbase server.

    3. earlier we were executing the script batch on the web server as the workflow will identify the lots on the web server and not on Essbase server, but after the development of this CDF to run the batch job, the batch files can be run directly Essbase server.

    4. the idea is to keep the user limited to the tasks list, so that it does not jump to the to-do list to SubVar web form, workflow and then return to the task list for a simple job to change SubVar.

    There were a few challenges that I encountered during the development of this JAVA function, namely:

    1 function CDF records do not : I tested JAVA code separately using command line and the executable Jar file will execute the batch, as expected. But I couldn't get why my CDF is not have recorded trace. After a lot of searching on Google and analysis, I found that it was the difference between the Version of JAVA (the JAVA compiler I used to compile and create my JAR file) and JAVA (JVM Essbase) virtual machine. I used JDK 1.7 update 65 to compile and create my POT so that the JVM used in the Essbase Server Update 1.6 is 35. I uninstalled JDK 1.7 of my machine, downloaded Update 1.6 35 archives of the Oracle and recompiled the code. Guess what! My CDF function was recorded first.

    So always check the compatibility of the Version of the JDK you used to compile and create the JAR file and JVM on your Essbase server.

    You can check the version of the JVM in console EAS-> EssbaseCluster-> right click-> Edit-> properties-> tab environment. There is a line that appears something like:

    ; JvmModuleLocation $J (EPM_ORACLE_HOME)-...-jdk160_35\jre\bin\server\jvm.dll (the bold is your version of the JVM).

    2. "main class not found" error after successful registration of CDF:

    I haven't had that one category of Public in my JAVA code and this error took me by surprise. I also checked the "public static void main" section in my code and everything seems to be OK. Please note that JAVA is case sensitive - 'hand' and 'Hand' aren't even in JAVA.

    I did some further research and one of John's response to a CDF request, I came to know that I need to include another argument (context) in the main section of my Java code and recompile with classpath "essbase.jar" (I will explain the controls in the next steps). I changed the main section of my JAVA code and included the argument:

    Public Shared Sub main (paramContext context, String [] paramArrayOfString)

    The following JAVA code to perform the batch in Essbase Server:

    import com.hyperion.essbase.calculator.Context;

    import java.io.BufferedReader;

    import java.io.InputStream;

    import java.io.InputStreamReader;

    import java.io.OutputStream;

    import java.io.PrintStream;

    public class BatEx

    {

    Public Shared Sub main (context, paramContext, String [] paramArrayOfString)

    {

    Try

    {

    String str1 = paramArrayOfString [0];

    LocalProcess process = Runtime.getRuntime () .exec (str1);

    InputStream localInputStream1 = localProcess.getInputStream ();

    OutputStream localOutputStream = localProcess.getOutputStream ();

    InputStream localInputStream2 = localProcess.getErrorStream ();

    BufferedReader in = new BufferedReader (new InputStreamReader (localInputStream1)) localBufferedReader;

    String str2;

    While ((str2 = localBufferedReader.readLine ())! = null) {}

    System.out.println (str2);

    }

    System.out.println ("package executed successfully.");

    }

    catch (Exception localException)

    {

    System.out.println ("error!:" + localException);

    localException.printStackTrace ();

    }

    }

    }

    Install the (compatible to Essbase JVM) compatible version of the JDK on your machine. Compile the above code by using the following command:

    C:\ >javac - classpath essbase.jar BatEx.java - please specify the path to the file "essbase.jar". It generally to the location: : \Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\

    The code should compile without any problem, and a .class file must be created with the same name.

    Now is the time to create the JAR file. Use the following command:

    C:\ >jar cf BatEx.jar BatEx.class

    Now the executable JAR file must also be created.

    Place this JAR file: : \Oracle\Middleware\EPMSystem11R1\products\Essbase\EssbaseServer\java\udf\

    Restart the service of Essbase and application (the only Application Restarting should work, but I didn't take any chances to restart both).

    Check the log of function CDF recording applications. The application log should be at the location:

    : \Oracle\Middleware\user_projects\epmsystem3\diagnostics\logs\essbase\essbase\app\-

    The CDF enrollment message should be something like:

    External function of [GLOBAL] [@BatEx] saved OK

    I used the following MaxL to register my function in Essbase:

    create or replace function '@BatEx' as

    "BatEx.

    Spec '@BatEx (StringArray).

    Comment "Functions A CDF that runs the batch file in Essbase Server"

    I used the following script to calc to run my CDF (fairly simple however):

    ESS_LOCALE English_UnitedStates.Latin1@Binary

    RUNJAVA BatEx "": / Oracle/Middleware/EPMSystem11R1/common/utilities/Test.bat ";" -Note: please replace with the name of the physical drive.

    I went and checked the logs that the Test.bat written and "wallah! The log file had some content and 1 KB in size. I deleted the contents of the log file and checked again, the result was the same.

    Hope this answer helps all of us who work on CDF that is clean.

    Please like this post if this can help you in some way.

    Thanks again to Amit, Jake and John for helping me solve this puzzle.

    Kind regards

    Amit Kumar Singh

  • Problem to run the shell script procedure

    Hello

    I wrote a shell script which needs to execute the stored procedure

    The shell script:
    cat bi_loading2.sh
    #!/usr/bin/ksh
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=/u01/app/oracle/product/11.2.0/DWH11gR2
    export ORACLE_SID=DWH
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
    echo "zero  arg  is  :$0"
    echo "First arg  is  :$1"
    echo "Second arg is  :$2"
    
    
    /u01/app/oracle/product/11.2.0/DWH11gR2/bin/sqlplus  system/xxx@dwh << EOF
    insert into SYSTEM.POC_EXDATA_RESULTS  values($1,'$2',sysdate,null);
    commit;
    
    
    execute system.$2;
         
    update SYSTEM.POC_EXDATA_RESULTS
    set end_date=sysdate
    where id= $1;
    
    commit;
    EOF
    exit 0
    The script gets two parameters: id (1) (2) the procedure that I have to run

    As you can see below oracle is to omit the 'run' command
    Please notice why I can't run the stored procedure.


    $ 83 poc_cf54xbx6cchf2 bi_loading2.sh
    zero  arg  is  :bi_loading2.sh
    First arg  is  :83
    Second arg is  :poc_cf54xbx6cchf2
    
    SQL*Plus: Release 11.2.0.2.0 Production on Thu Dec 15 17:46:37 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, Automatic Storage Management and Real Application Testing options
    
    SQL> 
    1 row created.
    
    SQL> 
    Commit complete.
    
    SQL> SQL> SQL> BEGIN  system.poc_cf54xbx6cchf2; END;
    
                    *
    ERROR at line 1:
    ORA-06550: line 1, column 17:
    PLS-00103: Encountered the symbol "SYSTEM" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "SYSTEM" to continue.
    
    
    SQL> SQL>   2    3  
    4 rows updated.
    
    SQL> 
    Commit complete.

    Read the error stack.

    ORA-06512: at "SYSTEM.POC_CF54XBX6CCHF2", line 3
    

    The error is on line 3 of the POC_CF54XBX6CCHF2 procedure
    If the procedure is called.

    ----------
    Sybrand Bakker
    Senior Oracle DBA

  • AppleScript and shell scripts

    I'm on Mac OS X 10.11.2 and have problems with AppleScript and shell scripting.

    The following script is a cutting of a larger project:

    Tell application "Finder".

    the value the_MePath (path for me)

    the value the_MeCont (the_MePath container) as string

    tell the end

    the value of the_MeCont (text 1 thru-2) the_MeContShell

    -normally isn't here!

    the value the_MePara (the_MeCont & "STH - C Para WAV_48k_24.txt")

    the value the_Parameters (opening for access file the_MePara with permission to write)

    write ("WAV\r24\r48000\r48k\r") the_Parameters

    Close access the_Parameters

    -normally isn't here!

    -destined to be there!

    -the value the_MePara (shell script 'find' & city form the_MeContShell POSIX path & "-iname" "Para STH - C *'")

    the value the_Parameters (opening for access file the_MePara)

    the value the_ParaList (read the the_MePara file)

    Close access the_Parameters

    paragraph 1 of the value userFormat the_ParaList

    paragraph 2 of the the_ParaList the value userBitDepth

    paragraph 3 of the the_ParaList the value userSampleRate

    paragraph 4 of the the_ParaList the value shortSampleRate

    The lines between the "-normally isn't there!"-lines fills a file in the directory of the AppleScript with the data.

    So now the file is there.

    If I remove these lines and enable the line below "-intended to be here! ', the shell should find this file.

    What I get, then, is a mistake:

    "Fehler beim Zugriff auf das Netzwerk." error number - 5000 file "/ users/shared/_AppleScript development/_Archiv Sniplets/STH-C Para WAV_48k_24.txt" to "class fsrf".

    to "open for access file the_MePara.

    Any ideas, anyone?

    Kind regards...

    ... Maik

    Hello

    Remove the end of file before the_MePara.

    the_MePara contains a posix path type path--> "/ users/shared/_AppleScript development/_Archiv Sniplets/STH-C Para WAV_48k_24.txt.

    You can use the file on the path of type HFS --> ' StartupDiskName:Users: shared: _AppleScript development: _Archiv Sniplets:STH - C Para WAV_48k_24.txt.

    Information:

    The script didn't need to open and close the access when the script to read-only.

    Use this line only--> the value the_ParaList to read the_MePara

  • script error when you try to play my pc game?

    I have the script error whenever I try to play one of these medical games I've purchased and downloaded from the internet. I don't know that I can do to fix it if someone could give me please an answer I would be very happy because I'm starting to get annoyed with the fact that I can't play the game and spend twenty dollars on it.

    Hi shanna2015,

    ·         What browser do you use?

    ·         What is the full error message that you receive?

    ·         Are you able to play games properly?

    If you use Internet Explorer, you can follow these methods and check if it helps.


    Method 1

    You can follow this link and check if the problem persists.

    How to resolve script errors in Internet Explorer on Windows computers

    Note: Article applies to IE 7 or IE 8 however remains valid for IE 9 as well.


    Method 2

    You can also enable compatibility view in Internet Explorer and try to play the game.

    Some sites Web may not behave as expected in Internet Explorer

    Hope the helps of information.

    Please post back and we do know.

  • my computer windows vista cannot install Mcafee because of the Java script error, code 0x80004005. How to solve this problem?

    When I install Mcafee, the error come out, can not install... Make sure you only if your PC has JAVA script. error code: 0x80004005, HOW t ofix it?

    Which version of Java should I download for my system to Windows 64-bit operating?
    http://www.Java.com/en/download/FAQ/java_win64bit.XML

    Installation of Java
    http://Java.com/en/download/help/index_installing.XML?user_os=Windows%207

    If you are using:

    * 32 - bit Internet Explore (IE), you need to download Java 32 bits (check the browser)
    * 64 - bit IE, you need to download Java 64 bit (check the browser)
    * 32-bit and 64-bit, IE you have to download 32-bit and 64-bit Java respectively

    64-bit operating system Windows comes with browsers Internet Explorer (IE) 32-bit and 64-bit. 32-bit IE comes by default. There are different versions of Java software available for download depending on whether you are using THE 32-bit or 64-bit browsers.

    Please note that the 64-bit Java is presented as a download option automatically for users of Internet Explorer 64-bit, as this is the only officially available for Windows 64-bit browser.

    Note: Java is updated on a frequent basis, you can expect to see a Java update notification in the bar from time to time.

    J W Stuart: http://www.pagestart.com

  • Call Shell Script from within PL/SQL - using DBMS_PIPE

    Hi all

    I'm trying to run a shell script inside my PL/SQL using DBMS_PIPE block (not sure if this is the right way or not)

    Pl Sql script

    ==========

    Set serveroutput size 100000

    declare

    cursor c1 is select * from mag_images

    where nom_image like '% comp2.

    v_path varchar2 (100): = ' / home/maguzzi/DOCUMENTS_DIR / ";

    v_result number: = 0;

    v_in_filename varchar2 (100): = v_path | ' test_file.jpg';

    v_out_filename varchar2 (100): = v_path | ' test_file_out.jpg';

    v_script varchar2 (100): = "tst_convert.sh";

    v_command varchar2 (200): = 'sh'. v_path | v_script | » '|| v_in_filename | » '|| v_out_filename;

    Start

    A1 to c1 loop

    dbms_output.put_line ('v_command: ' | v_command);

    write_to_file ('test_file.jpg', 'DOCUMENTS_DIR', a1. Content);

    dbms_output.put_line (' file write result: ' | v_result);

    v_result: = exec_host_command (v_command);

    dbms_output.put_line (' resize result :'|| file v_result);

    end loop;

    end;

    Result DBMS_OUTPUT

    ====================

    v_command: /home/maguzzi/DOCUMENTS_DIR/tst_convert.sh test_file.jpg test_file_out.jpg

    Result of the entry of the file: 0

    Result of resizing the file: 0

    PL/SQL procedure successfully completed.

    Function exec_host_command

    =======================

    FUNCTION to CREATE or REPLACE exec_host_command (lc_cmd IN VARCHAR2)

    RETURN INTEGER IS

    ln_status NUMBER;

    lc_errormsg VARCHAR2 (80);

    lc_pipe_name VARCHAR2 (30);

    BEGIN

    lc_pipe_name: = 'Maguzzi_PIPE ';

    DBMS_PIPE. PACK_MESSAGE (lc_cmd);

    ln_status: = dbms_pipe.send_message (lc_pipe_name);

    RETURN ln_status;

    END;

    /

    The Image of the BLOB is written to the correct location on the server "test_file.jpg", and although the exec_host_command function returns a value of 0, the shell script (tst_convert.sh) is not executed (i.e. no output file is created - outfile.txt and the image is not copied/converted to a new file name "" test_file_out.jpg" )

    Shell script

    ========

    tst_convert.sh

    echo 'Here' > outfile.txt

    Echo $1 > > outfile.txt

    Echo $2 > > outfile.txt

    resizing to convert $1 - $200 2

    Could this be problems with permissions on files?

    test_file1.jpg has permission - rw-rw-r-

    test_convert.sh a permission rwxrwxrwx

    When I run the script manually and pass in 2 parameters ($1 = infilename and $2 = outfilename), it works...

    I'd appreciate if someone can point out my mistake or suggest another method that works.

    Thanks in advance

    How long does it take to create the converted file? Remember that the external Scheduler is running asynchronously, so it is possible that the converted file does not exist yet when the PL/SQL block subsequently tries to open it.

    Try to add some delay seconds to the routine to ensure that the external task is completed:

        begin
          dbms_scheduler.create_job(
              job_name => 'MAG_IMAGE_CONVERT2'
            , job_type => 'EXECUTABLE'
            , job_action => '/home/oracle/DOCUMENTS_DIR/tst_convert2.sh' );--  '/home/oracle/DOCUMENTS_DIR/tst_convert.sh');
          dbms_scheduler.enable('MAG_IMAGE_CONVERT2');
          dbms_lock.sleep(3);
        end;
    

    This probably isn't really a viable solution in the long term if it turns out that this is really the problem.

  • OBIEE-Shell Script

    Hi all

    I'm trying my hands on scripting in OBIEE. I wrote following script

    #!/bin/bash
    export PATH=$PATH::$HOME/bin:/u01/app/oracle/obiee117g/instances/instance1/bin
    . /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl status
    
    

    When I run this script. I get the following error.

    /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl: line 25: =: command not found
    /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl: line 26: =: command not found
    /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl: line 28: syntax error near unexpected token `('
    /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl: line 28: `%commands = ('
    

    What Miss me?

    Thank you

    V

    TL; DR: this point on the third line of your script is redundant and the origin of the problem. Run this instead:

    /u01/app/oracle/obiee117g/instances/instance1/bin/opmnctl status
    

    Also, since you are using the absolute path (that is the full path to opmnctl, starting with a /) setting the environment variable PATH is redundant.

    Explanation:

    The dot is a shortcut for the command of the source , which has a different behavior to just run the script directly.

    You use source when you are wanting to run a script to set the environment etc. variables (an example of this is the script of bi - init.sh, which implements the OBI environment to run utilities such as nqcmd).

    If you open opmnctl itself, you will see that it is a perl script. The "shebang" on the first line tells linux to run the script using the perl interpreter, and I suppose when you are sourcing it Linux tries to pass under the shell running (bash) - and the perl language throws the bash syntax errors that you see

    More information: executable - different ways to execute a shell script - Unix & Linux change battery source or dot operator Man Page. Bash | SS64.com

  • Script error when you try to install VMware Player on Windows 8 computer laptop

    I downloaded the version 6.01 of VMware Player on the desktop of my laptop Windows 8, but every time I try to install I get the following error...

    An error has occurred in the script on this page

    Online: 1089

    Char: 7

    Error: Expected ')'

    Code: 0

    URL: file:///C:/Users/DG's/AppData/Local/Temp/vmware_1387286925/index.htm?langis 1033 & local is 1033

    Do you want to continue running scripts on this page?

    Yes/No

    I followed the base article of knowledge advising me to delete my browsing history and cache and try to download again, but nothing changes.

    If I click Yes or no installation goes out the window and my laptop computer fan starts but nothing seems to happen. If I try to abandon the installation by clicking the VM taskbar icon, I get a message saying that the installation is ongoing and to wait for it to finish... I waited more than an hour and the closest, I to a facility is an empty folder of VMware in My Documents.

    Can someone help me please.

    Jan

    DUDE...
    all you have to do is go to your c drive and do a "Tmp" folder name without comma
    then go to
    > office > on my comp. right click > go to properties > advanced system properties > click on enviourment variables >

    There are two folders temparory
    Click on the first time. folder then click on edit after it, change the value of "c:\Tmp" no comma

    do the same for the other temp. folder located here

    then click oK and reboot your pc

    its done, you can install your vmware

  • OEDQ 9.0.8 - external task - execution of Shell Script

    Hello Disqualification Experts.

    I am looking for your expert advise on this... With the help of the external task I am able to call the .bat (batchfiles) but I'm not able to run .ksh (UNIX shell script file), attached is the example script I am trying to run via the external task.

    File name: testfile.ksh

    #! / usr/bin/ksh

    Set - x

    $ORACLE_HOME/bin/sqlplus - s edq_test/edqtest@edqd < < EOF

    WHENEVER SQLERROR EXIT SQL. SQLCODE

    EXECUTE SP_TRUNCATE_TABLE ('ABC_OWN', 'ABC_TABLE');

    COMMIT;

    quit smoking;

    EXPRESSIONS OF FOLKLORE

    output

    Disqualification-> Manager-> External tasks-> Creates a new task called TestTask who has the below...

    Command: testfile.ksh

    Working directory: \opt\local\software\edq\config\commandarea

    Get this error Message:

    The external task (Execute testfile.ksh) failed because of the following exception: cannot run program "/ opt/local/software/edq/config/commandarea/testfile.ksh": error = 2. No such file or directory

    Thanks in advance!

    BG

    Dear Richard, thank you for your prompt response.

    # / bin/bash helped and I also have to export the ORACLE_HOME in the script, somehow the $ORACLE_HOME is not recognized by the external task.

    Example of Script working:

    #! / bin/bash

    export ORACLE_HOME=/ora02/oracle/product/11.2.0.4/client

    $ORACLE_HOME/bin/sqlplus - s edq_test/edqtest@edqdev<>

    WHENEVER SQLERROR EXIT SQL. SQLCODE

    EXECUTE SP_TRUNCATE_TABLE ('ABC_SCHEMA', 'ABC_TABLE');

    COMMIT;

    QUIT SMOKING;

    EXPRESSIONS OF FOLKLORE

    output

    Thanks for your help!

    BG

Maybe you are looking for