yes.. that is why I am confused.... I have checked my actual code in notepad++... the braces are fine.... like I said earlier if i comment IF statement ... I don't have the error... but with the IF statement I get that error....
my IF statement looks like ... the first post had a typo
Hi,
In a KSH script i have to run a sybase query and get the count into a unix variable.
How can i do that?
Your help is much appriciated.
Thanks,
sateesh (4 Replies)
Hi all,
I'm trying to run an sql inside a loop which looks like this
#!bin/ksh
while IFS=, read var1 var2
do
sqlplus -s ${USERNAME}/${PASSWORD}@${ORACLE_SID} << EOF
insert into ${TABLE}
(
appt_date
)
values
(
'${var1 }'
);
... (6 Replies)
hi all,
i am experiencing an error which i think an incorrect syntax for the where clause passing a variable was given. under is my code.
sqlplus -s ${USERNAME}/${PASSWORD}@${SID} << END1 >> $LOGFILE
whenever sqlerror exit
set serveroutput on size 1000000
declare
l_rc ... (0 Replies)
hey guys i need some help here i am trying to do a bash shell script to get a parent PID and then search for all childs and kill them all without killing the parent, my problem is in the loop it seems that i dont know how to make a if statment inside a while statment it does not give me what i... (5 Replies)
Hi there
I want to ask to a user something about each line of a file. This is my code:
#cat test.txt
first line
second line
third line
#cat test.sh
#!/bin/ksh
read_write () {
echo "Do you want to print the line (YES/NO)?\n"
read TEST
case ${TEST} in
YES) return 0;;
... (3 Replies)
Writing a bash script for use with Geektool, pulls the battery info, and shuffles images around so that an Image geeklet can display the correct expression as the desktop background. (Eventually I intend to make it more intricate, based on more variables, and add more expressions)
I'm extremely... (1 Reply)
Hello,
I am using shell scripting and I am recieving odd results from my if statement
if
I want it to enter the loop only if L1 is equal to zero and one of the other criteria are filled, however it is entering at other times as well. What can i do to fix this? i tried seperating it... (6 Replies)
Hello,
I have a problem. I want to launch a different sql queries for different shell parameter values, something like this.
#/bin/bash
case $1 in
"A")
sqlplus -s user/pass << SQL
query A;
SQL
"B") sqlplus -s user/pass << SQL2
... (3 Replies)
I was trying to write multiple conditions inside the if statement but its not working.
export VAR_NM=abc.txt
export CURR_DT=20131011
export PREV_DT=20131012
if &&
then
echo "Yes"
else
echo "NO"
fi
It should return Yes but returning NO always.Appreciate any help. (3 Replies)
Hello
can you please help me with below script which is meant to delete clients from multiple netbackup policies
I want to run a command insdie awk statement
apparelnlty this script is not working for me
for i in $( cat clients_list)
do
bppllist -byclient $i | awk... (6 Replies)
Discussion started by: Sara_84
6 Replies
LEARN ABOUT DEBIAN
authen::simple::dbi
Authen::Simple::DBI(3pm) User Contributed Perl Documentation Authen::Simple::DBI(3pm)NAME
Authen::Simple::DBI - Simple DBI authentication
SYNOPSIS
use Authen::Simple::DBI;
my $dbi = Authen::Simple::DBI->new(
dsn => 'dbi:SQLite:dbname=database.db',
statement => 'SELECT password FROM users WHERE username = ?'
);
if ( $dbi->authenticate( $username, $password ) ) {
# successfull authentication
}
# or as a mod_perl Authen handler
PerlModule Apache::DBI
PerlModule Authen::Simple::Apache
PerlModule Authen::Simple::DBI
PerlSetVar AuthenSimpleDBI_dsn "dbi:SQLite:dbname=database.db"
PerlSetVar AuthenSimpleDBI_statement "SELECT password FROM users WHERE username = ?"
<Location /protected>
PerlAuthenHandler Authen::Simple::DBI
AuthType Basic
AuthName "Protected Area"
Require valid-user
</Location>
DESCRIPTION
DBI authentication.
METHODS
* new
This method takes a hash of parameters. The following options are valid:
* dsn Database Source Name. Required.
dsn => 'dbi:SQLite:dbname=database.db'
dsn => 'dbi:mysql:database=database;host=localhost;'
* statement
SQL statement. The statement must take a single string argument (username) and return a single value (password). Required.
statement => 'SELECT password FROM users WHERE username = ?'
* username
Database username.
username => 'username'
* password
Database password.
password => 'secret'
* log Any object that supports "debug", "info", "error" and "warn".
log => Log::Log4perl->get_logger('Authen::Simple::DBI')
* authenticate( $username, $password )
Returns true on success and false on failure.
SEE ALSO
Authen::Simple.
Authen::Simple::Password.
DBI.
AUTHOR
Christian Hansen "ch@ngmedia.com"
COPYRIGHT
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-02-29 Authen::Simple::DBI(3pm)