Rex::C...s::Tail(3pm)
π NAME π
Rex::Commands::Tail β okay bestie, this one tails a file for you π«Ά
Version <= 1.0: all these functions will not be reported. Noted, periodt. π
Also super important: all these functions are not idempotent. So likeβ¦ don't run them twice expecting the same vibe, because that's not what's giving. π
πΈ DESCRIPTION πΈ
With this module you can tail a file. That's it. That's the whole serve. π
β¨ SYNOPSIS β¨
tail "/var/log/syslog";
Iconic. Minimal. Ate. π₯
π¦ EXPORTED FUNCTIONS π¦
tail($file) π«
This function will tail the given file. Lowkey exactly what it says on the tin, no cap.
task "syslog", "server01", sub {
tail "/var/log/syslog";
};
And if you want to control the output format, bestie, you can define a callback function π:
task "syslog", "server01", sub {
tail "/var/log/syslog", sub {
my ($data) = @_;
my $server = Rex->get_current_connection()->{'server'};
print "$server>> $data\n";
};
};
Look at that callback. The way it grabs $server and goes "$server>> $data\n". Main character energy fr fr. π
Heads up bestie: these functions are not idempotent and version <= 1.0 means they won't be reported. Just so you're not out here surprised. π
That's the whole page, gorgeous. It's from the User Contributed Perl Documentation, brought to you by perl v5.40.1, dated 2025-10-03. Slay, bye, love you ππβ¨
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms