Bash-History-Read
view release on metacpan or search on metacpan
lib/Bash/History/Read.pm view on Meta::CPAN
424344454647484950515253545556575859606162
while
(
defined
(
my
$line
= <
$fh
>)) {
if
(
$line
=~ /\A
#(\d+)$/) {
$ts
= $1;
}
else
{
$call_code
->(
$ts
,
$line
);
undef
$ts
;
}
}
}
sub
each_hist(&) {
my
$code
=
shift
;
_doit(
'each_hist'
,
$code
);
}
sub
parse_bash_history_file {
my
(
$path
) =
@_
;
$path
//=
$ENV
{HISTFILE} //
"$ENV{HOME}/.bash_history"
;
open
my
(
$fh
),
"<"
,
$path
or
die
"Can't open bash history file '$path': $!"
;
( run in 0.236 second using v1.01-cache-2.11-cpan-cba739cd03b )