NAME
edge - show the edge of logs with conditional grep
SYNOPSIS
$ edge [options] FILE_PATH
OPTIONS
-t --total-count also show the total line count
-g --
grep
grep
condition
-gv --grepv invert
grep
condition
-f --file file path
EXAMPLES
Here is the 4 lines 'error.log' file.
2014/06/27 08:43:00,not found
2014/06/27 08:43:01,not found
2014/06/27 08:43:02,not found
2014/06/27 08:43:03,
no
auth
Then you execute the edge
command.
$ edge error.
log
1: 2014/06/27 08:43:00,not found
4: 2014/06/27 08:43:03,
no
auth
The first line and the last line are output with a line number.
The below command is the other example of edge
with match condition.
$ edge --
grep
found error.
log
1: 2014/06/27 08:43:00,not found
3: 2014/06/27 08:43:02,not found
The above command is mostly same as below commands.
$ cat error.
log
|
grep
found | head -n1
$ cat error.
log
|
grep
found | tail -n1
$ cat error.
log
|
grep
found | wc -l
You can get total line count too.
$ edge -t --
grep
found error.
log
1: 2014/06/27 08:43:00,not found
3: 2014/06/27 08:43:02,not found
total: 4 lines
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.