I have a log file as shown below. Each line starts with instance nr.
What I need to have is a script which will look up "not in the User Database" phrase at each line and when the criteria matches, the script will go five lines above (from 367th instance to 362nd instance for this log file) and grab the IP.
First, I just rebuilt/installed my custom kernel & I don't know how to check if it ran properly (I'm fairly sure it did, but I'm looking for reassurance that it loaded the new kernel file).
Second, I'd love to get into programming, scripting, whatever, I want my imagination to be the builder &... (2 Replies)
I'm a senior in high school trying to start getting into computer programming. All I've done so far is picked up a book on C for beginners and started to teach myself. There aren't really any courses at my high school for introductory programming, so it looks like I'll have to wait for college to... (7 Replies)
Say I have a single bin directory with Linux and SunOS executables, like this:
bin/myprog_lnx
bin/myprog_sun
Assume these programs read from stdin and write to stdout and, thus, are meant to be run like this:
myprog_lnx < filein > fileout
My users may log in from a Linux or Solaris... (3 Replies)
Hi,
I'm writing my first daemon application. I need to make sure I cover my bases as far as correct procedures, etc... I've tried to do my own legwork by reading as much as I could on daemonizing programs, etc... There are so many different examples, some include this but not that, etc...... (3 Replies)
Hey , I have become pretty normal, using unix and what not and working around FEDORA 9
I was wondering does anyone have any IDEAS or have anything I should try to build or scripts to write ,
or possibly know any sites where I could practice some things just so I know I am writing them... (2 Replies)
Okay, so I'm not a complete newb when it comes to using Unix/Linux. I've been using Ubuntu for a few years now and I've dipped my toes into a few other distros but now I want to get a bit serious.
I'm looking at becoming a sysadmin but the trouble is...I have no idea where to start. What I'm... (1 Reply)
picked up a 9111-520 p5 hardware recently with 8 Gig of RAM, lots of internal disk space...6 x 140 gig
had 7.1 pre-installed, and managed to upgrade the firmware to latest SF240_xxxx
goal is to virtualize this and have LPARs running aix 7.1, 6.x, and Rhat for ppc ..
need some... (13 Replies)
Being a beginner in scripting I am not sure the direction to take to accomplish the below task and would love suggestions.
GOAL
input file: domains.list
Read input file, search in named.conf and find domain and delete entry for the purpose of cleanup activity.
named.conf entry example
zone... (8 Replies)
Discussion started by: djzah
8 Replies
LEARN ABOUT DEBIAN
plack::session::store::file
Plack::Session::Store::File(3pm) User Contributed Perl Documentation Plack::Session::Store::File(3pm)NAME
Plack::Session::Store::File - Basic file-based session store
SYNOPSIS
use Plack::Builder;
use Plack::Middleware::Session;
use Plack::Session::Store::File;
my $app = sub {
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
};
builder {
enable 'Session',
store => Plack::Session::Store::File->new(
dir => '/path/to/sessions'
);
$app;
};
# with custom serializer/deserializer
builder {
enable 'Session',
store => Plack::Session::Store::File->new(
dir => '/path/to/sessions',
# YAML takes it's args the opposite order
serializer => sub { YAML::DumpFile( reverse @_ ) },
deserializer => sub { YAML::LoadFile( @_ ) },
);
$app;
};
DESCRIPTION
This implements a basic file based storage for session data. By default it will use Storable to serialize and deserialize the data, but
this can be configured easily.
This is a subclass of Plack::Session::Store and implements its full interface.
METHODS
new ( %params )
The %params can include dir, serializer and deserializer options. It will check to be sure that the dir is writable for you.
dir This is the directory to store the session data files in, if nothing is provided then "/tmp" is used.
serializer
This is a CODE reference that implements the serialization logic. The CODE ref gets two arguments, the $value, which is a HASH
reference to be serialized, and the $file_path to save it to. It is not expected to return anything.
deserializer
This is a CODE reference that implements the deserialization logic. The CODE ref gets one argument, the $file_path to load the data
from. It is expected to return a HASH reference.
BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to
cpan-RT.
AUTHOR
Stevan Little <stevan.little@iinteractive.com>
COPYRIGHT AND LICENSE
Copyright 2009, 2010 Infinity Interactive, Inc.
<http://www.iinteractive.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.12.4 2011-07-27 Plack::Session::Store::File(3pm)