Calling HTML File in Shell Script.

Hi
I have a shell script and a HTML file.
HTML file is to create a Table.
the HTML Script is as follows
<html>
<body>
<table border="1">
<tr>
<td>Requisition Number</td><td>$PARAM0</td>
</tr>
<tr>
<td>Purcahse Order Number</td><td>$PARAM4</td>
</tr>
<tr>
<td>Purchase Line Number</td><td>$PARAM5</td>
</tr>
<tr>
<td>Hold Reason</td><td>$PARAM3</td>
</tr>
<tr>
<td>Hold Date</td><td>$PARAM2</td>
</tr>
</table>
</body>
</html>
The output of this HTML file is a table with 5 rows and 2 columns.
I saved this file as mail.html and placed it in the server where i have placed the Shell Script.
When i call this HTML in Shell Script ... as follow
cat /FND_TOP/bin/mail.html
the output is not the table but infact the html tags are displayed.
I need the table when i run this shell script.
It would be of great help if anyone has a good solution for this.
Thanks in Advance

First, you need to put the file where your httpd server (you will need apache running) can find it. This is usually some place like:
/var/www/html/table.htmlThen use a text-mode browser as Frits suggested to render it so your script can read it:
#!/bin/sh
lynx -dump http://localhost/table.html | while read row; do
    echo "${row}"
doneor how ever you want to process the data.
Another approach is to use XML transformations. First write an XML stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" version="1.0">
     <xsl:output indent="no" method="text" standalone="yes" version="1.0"/>
     <xsl:template match="*">
          <xsl:apply-templates/>
     </xsl:template>
     <xsl:template match="td">
          <xsl:text> </xsl:text>
          <xsl:value-of select="normalize-space()"/>
     </xsl:template>
</xsl:stylesheet>and then run your HTML through the {font:Courier}xsltproc{font} processor:
$ xsltproc table.xsl table.html
Requisition Number $PARAM0
Purcahse Order Number $PARAM4
Purchase Line Number $PARAM5
Hold Reason $PARAM3
Hold Date $PARAM2To be neat, I have omitted the many blank lines that were also output.
HTH

Similar Messages

  • Can I call host file ( Unix Shell script ) from Oracle 10g trigger

    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    parag

    user12009546 wrote:
    Hi,
    I am new to Oracle 10g. Can I call host file ( unix shell script ) from Oracle 10g trigger ?. I know it is possible. Pl explain me with small example
    thanks & regards
    paragIf you are in 10g, you can simple call shell script from DBMS_SCHEDULER:
    BEGIN
    DBMS_SCHEDULER.CREATE_JOB (
    job_name => 'TEST_SCRIPT',
    job_type => 'EXECUTABLE',
    job_action => 'PATH_OF_YOUR_SCRIPT',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=MINUTELY; INTERVAL=1',
    enabled => TRUE,
    comments => 'Shell script from Oracle'
    END;
    /

  • How to get ORA errors in alertlog file using shell script.

    Hi,
    Can anyone tell me how to get all ORA errors between two particular times in an alertlog file using shell script.
    Thanks

    Hi,
    You can define the alert log as an external table, and extract messages with SQL, very cool:
    http://www.dba-oracle.com/t_oracle_alert_log_sql_external_tables.htm
    If you want to write a shell script to scan the alert log, see here:
    http://www.rampant-books.com/book_2007_1_shell_scripting.htm
    #!/bin/ksh
    # log monitoring script
    # report all errors (and specific warnings) in the alert log
    # which have occurred since the date
    # and time in last_alerttime_$ORACLE_SID.txt
    # parameters:
    # 1) ORACLE_SID
    # 2) optional alert exclusion file [default = alert_logmon.excl]
    # exclude file format:
    # error_number error_number
    # error_number ...
    # i.e. a string of numbers with the ORA- and any leading zeroes that appear
    # e.g. (NB the examples are NOT normally excluded)
    # ORA-07552 ORA-08006 ORA-12819
    # ORA-01555 ORA-07553
    BASEDIR=$(dirname $0)
    if [ $# -lt 1 ]; then
    echo "usage: $(basename) ORACLE_SID [exclude file]"
    exit -1
    fi
    export ORACLE_SID=$1
    if [ ! -z "$2" ]; then
    EXCLFILE=$2
    else
    EXCLFILE=$BASEDIR/alert_logmon.excl
    fi
    LASTALERT=$BASEDIR/last_alerttime_$ORACLE_SID.txt
    if [ ! -f $EXCLFILE ]; then
    echo "alert exclusion ($EXCLFILE) file not found!"
    exit -1
    fi
    # establish alert file location
    export ORAENV_ASK=NO
    export PATH=$PATH:/usr/local/bin
    . oraenv
    DPATH=`sqlplus -s "/ as sysdba" <<!EOF
    set pages 0
    set lines 160
    set verify off
    set feedback off
    select replace(value,'?','$ORACLE_HOME')
    from v\\\$parameter
    where name = 'background_dump_dest';
    !EOF
    `
    if [ ! -d "$DPATH" ]; then
    echo "Script Error - bdump path found as $DPATH"
    exit -1
    fi
    ALOG=${DPATH}/alert_${ORACLE_SID}.log
    # now create awk file
    cat > $BASEDIR/awkfile.awk<<!EOF
    BEGIN {
    # first get excluded error list
    excldata="";
    while (getline < "$EXCLFILE" > 0)
    { excldata=excldata " " \$0; }
    print excldata
    # get time of last error
    if (getline < "$LASTALERT" < 1)
    { olddate = "00000000 00:00:00" }
    else
    { olddate=\$0; }
    errct = 0; errfound = 0;
    { if ( \$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (dtconv(\$3, \$2, \$5, \$4) <= olddate)
    { # get next record from file
    next; # get next record from file
    # here we are now processing errors
    OLDLINE=\$0; # store date, possibly of error, or else to be discarded
    while (getline > 0)
    { if (\$0 ~ /Sun/ || /Mon/ || /Tue/ || /Wed/ || /Thu/ || /Fri/ || /Sat/ )
    { if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    OLDLINE = \$0; # no error, clear and start again
    errfound = 0;
    # save the date for next run
    olddate = dtconv(\$3, \$2, \$5, \$4);
    continue;
    OLDLINE = sprintf("%s<BR>%s",OLDLINE,\$0);
    if ( \$0 ~ /ORA-/ || /[Ff]uzzy/ )
    { # extract the error
    errloc=index(\$0,"ORA-")
    if (errloc > 0)
    { oraerr=substr(\$0,errloc);
    if (index(oraerr,":") < 1)
    { oraloc2=index(oraerr," ") }
    else
    { oraloc2=index(oraerr,":") }
    oraloc2=oraloc2-1;
    oraerr=substr(oraerr,1,oraloc2);
    if (index(excldata,oraerr) < 1)
    { errfound = errfound +1; }
    else # treat fuzzy as errors
    { errfound = errfound +1; }
    END {
    if (errfound > 0)
    { printf ("%s<BR>",OLDLINE); }
    print olddate > "$LASTALERT";
    function dtconv (dd, mon, yyyy, tim, sortdate) {
    mth=index("JanFebMarAprMayJunJulAugSepOctNovDec",mon);
    if (mth < 1)
    { return "00000000 00:00:00" };
    # now get month number - make to complete multiple of three and divide
    mth=(mth+2)/3;
    sortdate=sprintf("%04d%02d%02d %s",yyyy,mth,dd,tim);
    return sortdate;
    !EOF
    ERRMESS=$(nawk -f $BASEDIR/awkfile.awk $ALOG)
    ERRCT=$(echo $ERRMESS|awk 'BEGIN {RS="<BR>"} END {print NR}')
    rm $LASTALERT
    if [ $ERRCT -gt 1 ]; then
    echo "$ERRCT Errors Found \n"
    echo "$ERRMESS"|nawk 'BEGIN {FS="<BR>"}{for (i=1;NF>=i;i++) {print $i}}'
    exit 2
    fi

  • How to call HTML file from forms 6i

    Please can any one told me how i can call HTML file placed in my computer in specific path from forms 6i
    i tried web.show_Document('file path','_blank');
    but it doesn't work with me i don't know why and it doesn't give me any error
    thanks

    thanks you for your reply
    but it still not working with me
    i tried this
    host('iexplore C:\PPF\UserManual\index.htm');
    is it true, any advice

  • How to Call Multiple Sessions through Shell scripting

    Dear Members,
    I have a scenario where I load data into target table from 20 different source tables.
    For this I have written three procedures where there exists an bulk insert executed on a same table in every procedure. Now I have to call these procedures simultaneously so that
    all three bulk loads are executed at once in different sessions.
    For this I have to write a shell script which opens 3 different sessions and execute all these packages at once.
    Can you guide me through.

    When you call sqlplus in your shell script, put a & at the end so that it runs the SQL scripts in the background. For instance:
    #!/bin/bash
    ...oracle home stuff
    $ORACLE_HOME/bin/sqlplus user/pass @script.sql &
    $ORACLE_HOME/bin/sqlplus user/pass @script2.sql &
    $ORACLE_HOME/bin/sqlplus user/pass @script3.sql &

  • How we can call or execute a SHELL script through Oracle forms or Reports

    How we can call or execute a SHELL script through Oracle forms or Reports.Its urgent.......

    Use HOST command.

  • How can i pass parameter values from html to a shell script

    Hi Guys...
    I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
    sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
    user sees this parameter form and enters some value in to that empno text box.
    My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
    Help Appreciated
    Thanx

    This is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
    There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
    Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G.

  • Call .html file in ABAP report (se38)

    Hi,
    My question is, is it possible to call and execute an html file in a report?
    For example, you have 2 containers in the report, 1 is for the html part and the 2nd for some ALV table (which is not the problem in this discussion).
    The HTML part is a separate .html file on the server which works with a few .js files called in it.
    I've done some research but couldn't find anywhere how read the HTML file in a report, and to work just like it does in a browser.
    All I found was how to create a javascript from a report (only some simple examples like show a string..), or how to create an HTML file from a report and execute it in se38, but instead I need to know how to read an HTML in the report and place it in a container (which is a little more complex because of all the javascripts that it calls within).
    Can anybody help me with this?
    Thanks!

    I saw this program but I couldn't figure out where is this called from: document_url      = 'HTMLFrame1.htm' on line 100.
    To be more precise i need to call this HTML file which is on the server, and i need it to be executed in the container of the report, alongside with the javascript files it calls within:
    <!doctype html>
    <html>
    <head>
        <title>Essential Studio for JavaScript : Radial Gauge - Default</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8">
        <link href="bootstrap.min.css" rel="stylesheet">
        <link href="ej.widgets.all.min.css" rel="stylesheet" />
        <link href="default.css" rel="stylesheet" />
        <link href="default-responsive.css" rel="stylesheet" />
        <script src="jquery-1.10.2.min.js" type="text/javascript"></script>
        <script src="jquery.easing.1.3.min.js" type="text/javascript"></script>
        <script src="excanvas.min.js" type="text/javascript"></script>
        <script src="ej.web.all.min.js" type="text/javascript"></script>
        <script src="properties.js" type="text/javascript"></script>
    </head>
    <body>
        <div class="content-container-fluid">
            <div class="row">
                <div class="cols-sample-area" align="center">
                    <div id="circularframe">
                        <div id="CoreCircularGauge">TEXT
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function () {
                $("#CoreCircularGauge").ejCircularGauge({
                    backgroundColor: "transparent", width: 500, load: "loadGaugeTheme",
                    scales: [{
                        showRanges: true,
                        startAngle: 122, sweepAngle: 296, radius: 130, showScaleBar: true, size: 1, maximum: 120, majorIntervalValue: 20, minorIntervalValue: 10,
                        border: {
                            width: 0.5,
                        pointers: [{
                            value: 100,
                            showBackNeedle: true,
                            backNeedleLength: 20,
                            length: 95,
                            width: 7,
                            pointerCap: { radius: 12 }
                        ticks: [{
                            type: "major",
                            distanceFromScale: 2,
                            height: 16,
                            width: 1, color: "#8c8c8c"
                        }, { type: "minor", height: 8, width: 1, distanceFromScale: 2, color: "#8c8c8c" }],
                        labels: [{
                            color: "#8c8c8c"
                        ranges: [{
                            distanceFromScale: -30,
                            startValue: 0,
                            endValue: 70
                            distanceFromScale: -30,
                            startValue: 70,
                            endValue: 110,
                            backgroundColor: "#fc0606",
                            border: { color: "#fc0606" }
                            distanceFromScale: -30,
                            startValue: 110,
                            endValue: 120,
                            backgroundColor: "#f5b43f",
                            border: { color: "#f5b43f" }
        </script>
    </body>
    </html>

  • Going to another html file in a script

    I won't lie to u, I'm new programing. I have a page script that uses the window.location = URL and it works (is for a proyect) but the professor wants it to work localy so i transalted my pages using frontpage so they don't have an URL but i can't find a way to make the scripts go to the local pages. What can i do?
    This is an example of the code:
    alert('Wrong password, please try again');
    window.location="wrong.htm";
    where wrong.htm is the local file, it worked when it said:
    alert('Wrong password, please try again');
    window.location="http:\\URL...\\wrong.htm";
    Hope u can help me.

    Moreover, if your file is in the same directory as the other html files, you should be able to use :
    alert('Wrong password, please try again');
    window.location="wrong.htm";
    If it's in a different directory from your main page, you can use the relative path. Let's say that your "wrong.htm" is in a subdirectory called "error", you could use :
    alert('Wrong password, please try again');
    window.location="error\\wrong.htm";

  • Passing params from SQL file to Shell Script and then from Shell to SQL Fil

    Afternoon guys,
    Have a fun question for all you gurus in shell scripting out there. I have a shell script that is calling 2
    different SQL programs. My objective is to pass a variable called request_number from one sql program
    to the shell script and then from the shell script back to another SQL program. I will explain why I
    need this to happen.
    Here is what the shell script looks like which calls sql programs student_load_a.sql and
    student_load_b.sql. Student_load_a.sql basically creates the control file (.ctl) which is needed for the
    SQL*Loader and then student_load_b.sql reads the table that was just loaded and does the main
    processing. My main objective here is to be passing the request_number which is being generated
    using an Oracle Sequence in student_load_a.sql and using this generated number in my main
    processing in student_load_b.sql to select records from the table based on request_number.
    Any ideas ?Any help or recommendations is welcome and appreciated.
    *1. Shell Script*
    # Accept system input parameters
    p_user_id=$1
    p_job_id=$2
    # Create control files for sqlload
    sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_a.sql $p_job_id
    exit_status=$?
    # Do sqlloads
    sdesqlldr.exe userid=$p_user_id control=student_load-$p_job_id.ctl \
                                                 log=student_load-$p_job_id.log \
                                                 bad=student_load-$p_job_id.bad
    exit_status=$?
    # Main processing
    # sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id $p_request_number
    sqlplus.exe -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id
    exit_status=$?
    exit 0*2. student_load_a.sql (Would like to pass back the Sequence Number back to shell script and then use in student_load_b.sql*
    -- Accept system input parameters
    define p_job_id = &1
    spool student_load-$p_job_id.ctl
    select
    'append into table TMP_STUDENT_LOAD
    FIELDS TERMINATED BY '','' optionally enclosed by ''"''
    trailing nullcols
    (request_number CONSTANT ' || '''' || request_number_seq.nextval || ''',
    student_id)'
    from   dual
    spool off;
    exit 0;
    {code}
    *3. student_load_b.sql (This is a big file so I am only adding code that is relevant for the SQL)*
    {code}
    declare
      v_request_number    number(6);
      v_student_id                  number(7);
      cursor cur_student_load is
        select  student_id
        from   TMP_STUDENT_LOAD
        where  request_number = v_request_number
        order by 1;
    begin
        v_user_id := '&1';
        v_job_id := &2;
        -- This is the variable I would like to be be passing from shell script to student_load_b.sql
        -- v_request_number = '&3';
         open  cur_student_load;
         fetch cur_student_load into v_student_id;
          exit when cur_student_load%notfound;
          .... more logic of if then else in here
         close cur_student_load;
    end;
    {code}
    Edited by: RDonASnowyDay on Jan 29, 2010 4:03 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    How come you are mixing WinDoze script (*.exe) with Unix?
    You are aware that you will be passing the password along with the user id to the second sql script?
    I will assume Unix ksh:
    # Accept system input parameters
    p_user_id=$1
    p_job_id=$2
    # Create control files for sqlload
    p_seqno=`sqlplus -s $p_user_id @$STUDENT_PATH/student_load_a.sql $p_job_id`
    exit_status=$?
    # Do sqlloads
    sqlldr userid=$p_user_id control=student_load-$p_job_id.ctl \
           log=student_load-$p_job_id.log \
           bad=student_load-$p_job_id.bad
    exit_status=$?
    # Main processing
    # sqlplus -s $p_user_id @$STUDENT_PATH/student_load_b.sql $p_user_id $p_job_id $p_request_number
    sqlplus -s $p_user_id @$STUDENT_PATH/student_load_b.sql \
               $p_user_id $p_job_id $p_seqno
    exit_status=$?
    exit 0And the first sql script would look like this:
    -- student_load_a.sql
    -- Accept system input parameters
    set echo off pages 0 feed off lin 80 trims on ver off
    def p_job_id = &1
    col seqno NEW_VALUE seqno
    select request_number_seq.nextval seqno from dual;
    set term off
    spool student_load-$p_job_id.ctl
    select
    'append into table TMP_STUDENT_LOAD
    FIELDS TERMINATED BY '','' optionally enclosed by ''"''
    trailing nullcols
    (request_number CONSTANT ''&&seqno'',
    student_id)'
    from   dual
    spool off;
    exit 0;
    {code}
    :p                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Delete backup files using shell script

    Hi Gurus,
    I have to delete previous month backupfiles like sample.ttp-04-24-06 file from directory called 0424. Like that I need to delete the whole month files by using shell script.
    Please I will run this script once in a month. So it will delete all previous month's backup files which are available in the date directory of that month(0401,0402,0403 etc).
    Please help me out to solve this issue.
    Thanks in advance.

    Hi Fish,
    Its working fine. Thanks a lot for your excellent idea to solve my issue.
    Thanks again.
    bye,
    Peter.

  • Calling html file within web.show document as a report output

    /* this is blank html file included javascript for disabling mouse right click working fine*/
    WEB.SHOW_DOCUMENT ('http://prod.artisticmilliners.com:8000/files/file.html','_blank');
    /* this is oracle report output within model frame working fine*/
    WEB.SHOW_DOCUMENT ('javascript:void(window.open("'|| URL || '","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_self');
    I want to add show report output with right mouse click disable. Pleae guide how can i do it?

    Let me start by saying that disabling the right mouse will do nothing but frustrate users. It doesn't protect the page content from anything. There are various other ways to get the content from the page copied locally. And more importantly, this does not_ offer any kind of security.
    Ok, so you have decided to do it anyway ;)
    In order to make this happen, you would need to modify the report. I will assume that when you said "report" you meant Oracle Reports. Open the report file (.rdf) and edit the report's "Before Report Value".
    The default value is:
    <html>
    <head>
    <meta http-equiv="Content-Type"  content="text/html; charset=&Encoding">
    </head>
    <body dir=&Direction bgcolor="#ffffff">Change it to this:
    <html>
    <head>
    <meta http-equiv="Content-Type"  content="text/html; charset=&Encoding">
    </head>
    <script language="javascript">
    document.onmousedown=disableclick;
    status="Right Click Disabled";
    Function disableclick(e)
      if(event.button==2)
         alert(status);
         return false;   
    </script>
    <body oncontextmenu="return false" dir=&Direction bgcolor="#ffffff">Save the changes and retest.

  • How to call a procedure from  Shell Script

    Friends,
    How can i call a procedure from a shell script ? If any one know the answer , let me know immediately .
    Thanks in advance .
    Chakks

    We connect using SQLPlus commands on the Unix server:-
    Our code block is below:- We've got DBMS_OUTPUT in the procedure, hence the spooling. You don't need all this, but you do need the sqlplus directory, etc... in your profile.
    sqlplus -s <<EOF > ${CREATE_LOG_FLE}
    $UserName/$Password@$SID
    SET SERVEROUTPUT ON SIZE 1000000;
    spool ${CREATE_LOG_FLE}
    EXECUTE $STORED_PROC(${Months}, ${DeleteRecords});
    EOF
    Hope that helps

  • Calling HTML file from servlet and vice versa...

    i have got few questions..
    1- if a site is made in HTML then what should be used to put user login functionality in it, servlets or jsp or other option(specify)?
    2- im trying to do with servlets, so when im calling doPost method from HTML page and sending data, everything working fine but because of this the page refreshes and the HTML coding get lost, so how can i stop that from happening if possible, like showing the same page with messege = "Logged in".
    3- how can i call an HTML page from servlet?
    4- how can i send data from servlet to HTML page?

    that i m aware of, but when a servlet is called then the page will refresh n it will display the things that you have mentioned in the servlet file n not the things that u have mentioned in HTML file, n the page will be blank if u have not mentioned any HTML coding in servlet file.
    so i need to knw how to call back that prev HTML file so that the things i want to display can be displayed, i knw the same can be done by adding the HTML code in servlet file but i would like to know if there is any way to call back the HTML file.

  • Make .dmp file using shell script

    i am new in linux.
    i want to make .dmp file(export form a table) in a particular directory using shell script .
    then form .dmp file i want to convert it in .zip file
    Edited by: 855516 on Jul 18, 2011 5:26 PM

    The following should give you a head start:
    Create the following file i.e. scott_export.sh
    #!/bin/bash
    MAILADR="[email protected]"
    EXPDIR="/home/oracle/datapump"
    EXPDIR4SQL="'$EXPDIR'"
    DUMPFILE="export_`date +%N`.dmp"
    LOGFILE="export_`date +%N`.log"
    ORACLE_SID=test; export ORACLE_SID
    PATH=$PATH:/usr/local/bin; export PATH
    ORAENV_ASK=NO
    . /usr/local/bin/oraenv
    mkdir -p $EXPIDR 2>/dev/null
    sqlplus -s /nolog <<EOF
    connect / as sysdba
    set pages 0 feed off
    create or replace directory datapump as $EXPDIR4SQL;
    grant read, write on directory datapump to scott;
    exit
    EOF
    expdp scott/tiger tables=EMP,DEPT \
          transport_full_check=y \
          directory=datapump dumpfile=$DUMPFILE logfile=$LOGFILE
    gzip $EXPDIR/$DUMPFILE >> $EXPDIR/$LOGFILE
    cat $EXPDIR/$LOGFILE | mailx -s "$LOGFILE" $MAILADR
    # ENDGive execute privileges:
    $ chmod 750 scott_export.sh
    The above script should also work as a cron job.

Maybe you are looking for

  • Meter graphic issue in 9.0.2 9.1.0

    alright i did a little test after noticing in 9.1.0 that sometimes the meter rom the inspector window or mixer window is not moving even sound pass thru. This behavior doesn't happens on logic 8.0.2, but happens in logic 9.0.2 and logic 9.1.0. to tes

  • File not getting picked up by the FTP Adapter.............URGENT

    Hi Experts, I have created simple File to File scenario to archive a xml file of size 640 MB with in a FTP server. I monitored the channel for 2 hrs, it started but didn't picked the source file. Is it because of the huge file size? Please give your

  • App update [iOS]

    I have an iPad air and was loving the ability to highlight, underline and add comments to a PDF. The latest app update has some funky glitches including hhighlighting everything and then undoing only a random portion of the text such as an inch wide

  • Shut OFF group messages?

    I got my iPhone 5 a few weeks ago. I set my GROUP MESSAGES to OFF. When I would send a message to a few friends. It always said "OUTGOING" at the top and when they replied, it went into their individual message thread and only to me, which is what I

  • Image.getScaledInstance doesn't scale

    Hi All! I've got a problem with image scaling of JPG file. In the constructor body of my class that inherites from JPanal I wrote following code: Image image,image1; image = (new ImageIcon(this.getClass().getResource("/Pics/about.jpg"))).getImage();