...
now it is giving the error schema_ta_example does not exist , why because from the above first method it connect successfully and display the content of table why it is giving the error if i put EOF
...
There's nothing wrong with the here-document ("EOF"), but your script is incorrect. Remove the ">" character right before your query and put the sql terminator ";" after it.
Hi,
I'd like to access a windows directory from aix with samba client.
To allow direct access (not interactive), i'm using EOF like:
smbclient \\\\winserver\\windir 'passwd' -U usersmb << EOF
cd subwindir
put myfile
EOF
The access is correct but does somebody know how to trap errors... (1 Reply)
Hello, you are an awesome crowd! You answered my last questions, thank you sooo much!
I am trying to write a korn shell script that will record the memory my application is using (HP-UX B.11.11) and I have this:
if (( $APP > $THRESHOLD ))
then
echo "Warning message will display"
cat... (2 Replies)
Hello all,
I have unix file that ends with the following EOF '9999999999'
I want to remove the '\n' character after EOF. What is the command that should be included in the script, before sending the file?
will this work:
$ echo "<99999999999>\c" >> <filename>
thanks in advance. (3 Replies)
hi guys
i have such simple script, which i'm executing on AIX 5.3
#!/usr/local/bin/expect
spawn passwd exptest
set password 123
expect "*password:*"
send "$password\r"
expect "*password again:*"
send "$password\r"
expect eof
the output is following:
spawn passwd exptest
sh:... (4 Replies)
I'm trying to connect to oracle with the following code in the script:
checksqlerror{
if
echo $1
exit
fi
}
$SQLPLUS username/password@schemaname
checksqlerror "failed to connect to oracle"
If I'm passing wrong schema name,instead of executing checksqlerror it stops and expects user... (2 Replies)
How can I write EOF into a file?
I tryed to do as follows:
size=sizeof(EOF);
end_of_file=EOF;
write(fdMutexRichieste, &end_of_file, size);
But it does non work correctly,
becouse in the next cicle (using lseek(..., SEEK_END) of my code it seems to ignore my EOF and use the LAST... (5 Replies)
In shell file, i am writing following statement:
cat > File1.sh <<EOF
set feedback off
set serveroutput on
cat > File2.sh <<EOF
contents of second file
EOF
Contents of First file
EOF
Actually, i want these bolded statements in File1.sh as it.
But after first EOF, contents are... (1 Reply)
Hey!
Can I write a routine that allows me to in a txt file check line by line until the end of file?
something like
until do
---some code---
done
maybe it is a stupid question but I never learned shell scripts and I need this :p
thanks in advance (1 Reply)
Hi friends ,
I am confused with << EOF
EOF
Most of the cases I found
sqlplus $db_conn_str << EOF
some sql staments
EOF
another exapmle is
#!/bin/sh
echo -n 'what is the value? '
read value
sed 's/XXX/'$value'/' <<EOF
The value is XXX
EOF (1 Reply)
Hey guys... first post here...
I have set up the following cron to create daily backups for me and rotate them weekly:
date=`date +%d`; tar -zcvf /home/mysite/backups/backup_dev_$date.tgz /home/mysite/public_html/dev/app --exclude=/home/mysite/public_html/dev/app/tmp
However, I keep... (4 Replies)
Discussion started by: Crazy Serb
4 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)