10-05-2006
Try EOF
where you have the exit 0, try putting EOF. Im a newb, but I think when you use <<EOF it expects anything between that and EOF to be commands within the program you started before the <<EOF.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Could anyone please help me. I have a function in plsql that returns a number. But i am listing some records through that function using DBMS_OUTPUT.PUT_LINE. I want to catch those records by executing this function through a unix script. The following shows what i did
echo "Connected from... (2 Replies)
Discussion started by: cobroraj
2 Replies
2. Programming
Hi,
-How can I get number of files, cpu usage (percentage), memory usage, disk usage, ...etc, using C program ... I can use unix command ( system(command) )but I want the value to be returned back to my C program to use it in my code? How can I do that?
Thanks in advance ... (2 Replies)
Discussion started by: zainab
2 Replies
3. UNIX for Advanced & Expert Users
Hi
Can anyone please let me know how to call unix scripts from sql or plsql ASAP. (2 Replies)
Discussion started by: ksailesh
2 Replies
4. Programming
Hi All,
I am supposed to present the documentation for the PLSQL code (PACKAGES, PROCEDURE, FUNCTIONS) of my application. There are sufficient comments in my code. Has anyone written any Shell Script Utility which can parse the PLSQL code and generate some kind of document ( preferrably HTML not... (1 Reply)
Discussion started by: gauravsachan
1 Replies
5. Programming
I am running the following ealth checks on my server
there are two databases in my server . MODEL1 and MODEL2
i connect with the first database as
sqlplus model1/password
Then i exceute a query
select x from table (4 Replies)
Discussion started by: asalman.qazi
4 Replies
6. Shell Programming and Scripting
Hi,
I would like to write a script with include more than 6 unix commands.
my script like below:
echo " script started"
ls -ld
bdf | grep "rama"
tail -10 log.txt
...
..
...
now, i want to run above unix commands one by one.
example:
first the ls -ld command will be... (3 Replies)
Discussion started by: koti_rama
3 Replies
7. Shell Programming and Scripting
Executing two unix commads via perl script one after another
e.g: make clean
bsub -i -q short make
have tried using exec but the second command doesnt executes (1 Reply)
Discussion started by: rajroshan
1 Replies
8. Shell Programming and Scripting
Hi
This is my bash script.i am calling validation.sql and passing a value to it using ${flds}.
i want the cnt variable in plsql script to be passed to unix.
LOADREC=`sqlplus -s $ORACLE_USR <<-EOF
spool $ORACLE_LOG_FILE;
echo "barani"
@validation.sql #calling the plsql script
${flds}... (6 Replies)
Discussion started by: barani75
6 Replies
9. Shell Programming and Scripting
Hi ,
I am trying to use the below in awk but failed, any one assist please,
awk '{ print $0;
if ( $0 ~ /LOADTMP1/ )
{
print $4;
Table_name=system($( db2 -x "SELECT TRIM(TD.BSCHEMA) || '.' || TRIM(TD.BNAME) AS TABLE_NAME FROM SYSCAT.TABDEP TD WHERE
TD.BTYPE='T' AND... (2 Replies)
Discussion started by: Nandy
2 Replies
10. Shell Programming and Scripting
I am running plsql using printf on a shell, but i am getting some strange error, can someone point what exactly am i missing,
$ echo $SHELL
/bin/bash
$ printf "
> SET serveroutput ON trimspool on feed off echo off
> declare
> p_val number;
> d_val varchar2(10);
> begin
> SELECT... (1 Reply)
Discussion started by: kamauv234
1 Replies
LEARN ABOUT DEBIAN
filter::eof
Filter::EOF(3pm) User Contributed Perl Documentation Filter::EOF(3pm)
NAME
Filter::EOF - Run a callback after a file has been compiled
VERSION
0.04
SYNOPSIS
package MyPackage;
use warnings;
use strict;
use Filter::EOF;
sub import {
my ($class, @args) = @_;
my $caller = scalar caller;
# set the COMPILE_TIME package var to a false value
# when the file was compiled
Filter::EOF->on_eof_call(sub {
no strict 'refs';
${ $caller . '::COMPILE_TIME' } = 0;
});
# set the COMPILE_TIME package var to a true value when
# we start compiling it.
{ no strict 'refs';
${ $caller . '::COMPILE_TIME' } = 1;
}
}
1;
...
package MyUsingPackage;
use warnings;
use strict;
our $COMPILE_TIME;
use MyPackage;
# prints 'yes'
BEGIN { print +( $COMPILE_TIME ? 'yes' : 'no' ), "
" }
# prints 'no'
print +( $COMPILE_TIME ? 'yes' : 'no' ), "
";
1;
DESCRIPTION
This module utilises Perl's source filters to provide you with a mechanism to run some code after a file using your module has been pro-
cessed.
METHODS
"import( @functions )"
Currently, only a function equivalent of the "on_eof_call" method is provided for export.
use Filter::EOF qw( on_eof_call );
sub import {
my ($class) = @_;
...
on_eof_call { ... };
}
...
"on_eof_call( $code_ref )"
Call this method in your own "import" method to register a code reference that should be called when the file "use"ing yours was compiled.
The code reference will get a scalar reference as first argument to an empty string. if you change this string to something else, it will
be appended at the end of the source.
# call C<some_function()> after runtime.
Filter->on_eof_call(sub {
my $append = shift;
$$append .= '; some_function(); 1;';
});
EXPORTS
on_eof_call
You can optionally import the "on_eof_call" function into your namespace.
EXAMPLES
You can find the example mentioned in "SYNOPSIS" in the distribution directory "examples/synopsis/".
SEE ALSO
Filter::Call::Util, "Exporting without using Exporter's import method" in Exporter
AUTHOR AND COPYRIGHT
Robert 'phaylon' Sedlacek - "<rs@474.at>". Many thanks to Matt S Trout for the idea and inspirations on this module.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
perl v5.8.8 2008-03-08 Filter::EOF(3pm)