I would like a simple shell script that will allow me to display to screen all unsuccessful su attempts in my sulog file, for the present date.
I have been trying several different combinations of commands, but I can't quite get the syntax correct.
The mess I have right now (don't laugh) is... (4 Replies)
Im tyring to create a script that will show me any lines in a file with todays date and yesterdays, the date format in the file is as follows
----- amqxfdcx.c : 728 --------------------------------------------------------
07/12/05 09:53:20
AMQ6109: An internal WebSphere MQ error has... (3 Replies)
I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
I have a script which tails a log file and if it finds certain strings in the data tailed it sends an email, basically like this:
tail -f logfile > tmp.file &
sleep 10
kill $!
STRING=$(grep -c "string" tmp.file)
&& echo $STRING | mailx -s "Warning.." admin@123.com
When the string is... (10 Replies)
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Hi Folks,
I am searching for a pattern in logs through putty by opening the file in vi editor
and reaching to the last of the file by $ and then searching the pattern , lets say I have to search the pattern abc then it would be ?abc Now I want line numbers along with the matching pattern to be... (3 Replies)
Command 1:
$script | grep 'Write to ECC( SSID=MARGIN)'
Command 2:
$script | grep 'is not greater than existing logical processing'
The above commands run my script and search the mentioned strings but I do not want to run my script twice. It is increasing run time.
Can someone tell me... (3 Replies)
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Discussion started by: invinzin21
12 Replies
LEARN ABOUT DEBIAN
git::repository::log::iterator
Git::Repository::Log::Iterator(3pm) User Contributed Perl Documentation Git::Repository::Log::Iterator(3pm)NAME
Git::Repository::Log::Iterator - Split a git log stream into records
SYNOPSIS
use Git::Repository::Log::Iterator;
# use a default Git::Repository context
my $iter = Git::Repository::Log::Iterator->new('HEAD~10..');
# or provide an existing instance
my $iter = Git::Repository::Log::Iterator->new( $r, 'HEAD~10..' );
# get the next log record
while ( my $log = $iter->next ) {
...;
}
DESCRIPTION
"Git::Repository::Log::Iterator" initiates a git log command from a list of paramaters and parses its output to produce
"Git::Repository::Log" objects represening each log item.
METHODS
new( @args )
Create a new git log stream from the parameter list in @args and return a iterator on it.
"new()" will happily accept any parameters, but note that "Git::Repository::Log::Iterator" expects the output to look like that of
"--pretty=raw", and so will force the the "--pretty" option (in case "format.pretty" is defined in the Git configuration).
Extra output (like patches) will be stored in the "extra" parameter of the "Git::Repository::Log" object. Decorations will be lost.
When unsupported options are recognized in the parameter list, "new()" will "croak()" with a message advising to use "run( 'log' => ... )"
to parse the output yourself.
next()
Return the next log item as a "Git::Repository::Log" object, or nothing if the stream has ended.
AUTHOR
Philippe Bruhat (BooK), "<book at cpan.org>"
COPYRIGHT
Copyright 2010 Philippe Bruhat (BooK), all rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-12-28 Git::Repository::Log::Iterator(3pm)