i am substituting some text in the xml file using sed, on shell directly it works fine, but when i run it inside script file, it say, the function cant be parsed, i think the prob is due to xml file, kindly help (4 Replies)
I have a command nested in some while loops to parse some data that looks something like this.
while ($condition)
while ($condition)
...
gzcat /dir/$fileName.gz | grep $searchString > out_file
end
end
On the first loop, the command is executed properly (and takes maybe 10... (3 Replies)
Hi all,
I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously.
for Keeping... (2 Replies)
below is the output where i'm getting the same times tamp throughout the loop., where i'm expecting that to log the current time stamp..
C:\Users\ilango>for /l %i in (1,1,5) do echo for %i
C:\Users\ilango>echo for 1
for 1
C:\Users\ilango>echo for 2
for 2
C:\Users\ilango>echo... (1 Reply)
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
Hello,
You might help a newbie like me, I am trying to run a .sh inside my shell script. After running that I need to execute below commands. Here's how my scripts looks like. Hope you can help:
#!/bin/sh
cd $ORACLE_HOME/owb/bin/unix
./OMBPlus.sh ---> goes to OMB+> directory
cd... (10 Replies)
Hi ,
Please excuse me for opening a new thread i am unable to find out the syntax error
in my if else condition inside for loop in awk command ,
my actual aim is to print formatted html td tag when if condition (True) having string as "failed",
could anyone please advise what is the right... (2 Replies)
Hi All, my script.sh has the below lines, and i need to run the script as root or wam. please tell me if this will work
#!/bin/bash
sudo -t wam /usr/local/wam/stopwam -r ------- this needs run as wam user
/usr/local/web/stopweb -a --- this needs to run as... (18 Replies)
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
LEARN ABOUT DEBIAN
apache::session::browseable::mysql
Apache::Session::Browseable::MySQL(3pm) User Contributed Perl Documentation Apache::Session::Browseable::MySQL(3pm)NAME
Apache::Session::Browseable::MySQL - Add index and search methods to Apache::Session::MySQL
SYNOPSIS
use Apache::Session::Browseable::MySQL;
my $args = {
DataSource => 'dbi:mysql:sessions',
UserName => $db_user,
Password => $db_pass,
LockDataSource => 'dbi:mysql:sessions',
LockUserName => $db_user,
LockPassword => $db_pass,
# Choose your browseable fileds
Index => 'uid mail',
};
# Use it like Apache::Session
my %session;
tie %session, 'Apache::Session::Browseable::MySQL', $id, $args;
$session{uid} = 'me';
$session{mail} = 'me@me.com';
$session{unindexedField} = 'zz';
untie %session;
# Apache::Session::Browseable add some global class methods
#
# 1) search on a field (indexed or not)
my $hash = Apache::Session::Browseable::MySQL->searchOn( $args, 'uid', 'me' );
foreach my $id (keys %$hash) {
print $id . ":" . $hash->{$id}->{mail} . "
";
}
# 2) Parse all sessions
# a. get all sessions
my $hash = Apache::Session::Browseable::MySQL->get_key_from_all_sessions();
# b. get some fields from all sessions
my $hash = Apache::Session::Browseable::MySQL->get_key_from_all_sessions('uid', 'mail')
# c. execute something with datas from each session :
# Example : get uid and mail if mail domain is
my $hash = Apache::Session::Browseable::MySQL->get_key_from_all_sessions(
sub {
my ( $session, $id ) = @_;
if ( $session->{mail} =~ /mydomain.com$/ ) {
return { $session->{uid}, $session->{mail} };
}
}
);
foreach my $id (keys %$hash) {
print $id . ":" . $hash->{$id}->{uid} . "=>" . $hash->{$id}->{mail} . "
";
}
DESCRIPTION
Apache::Session::browseable provides some class methods to manipulate all sessions and add the capability to index some fields to make
research faster.
SEE ALSO
Apache::Session
AUTHOR
Xavier Guimard, <x.guimard@free.fr>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Xavier Guimard
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2010-12-08 Apache::Session::Browseable::MySQL(3pm)