genlines - Produce lines with a specified speed range
This document describes version 0.003 of genlines (from Perl distribution App-genlines), released on 2016-10-01.
Generate 10 lines per second (default):
% genlines
Generate 100 lines per second:
% genlines --speed 100
Generate between 20 to 30 lines per second. Speed will change (but still be in the 20-30 lines/sec range) every 5 seconds (default):
% genlines --min-speed 20 --max-speed 30
Generate between 0.1 to 10 lines per second. Change speed after between 3 to 10 seconds.
% genlines --min-speed 0.1 --max-speed 10 \ --min-change-speed-every 3 --max-change-speed-every 10
Option to take lines from input or customize lines.
If this is specified instead of --speed, will set speed to a random number between --min-speed and --max-speed.
--speed
--min-speed
--max-speed
If this is specified instead of --change-speed-every, will change speed after a random number of seconds between --min-change-speed-every and --max-change-speed-every.
--change-speed-every
--min-change-speed-every
--max-change-speed-every
This script has shell tab completion capability with support for several shells.
To activate bash completion for this script, put:
complete -C genlines genlines
in your bash startup (e.g. ~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
~/.bashrc
It is recommended, however, that you install shcompgen which allows you to activate completion scripts for several kinds of scripts on multiple shells. Some CPAN distributions (those that are built with Dist::Zilla::Plugin::GenShellCompletion) will even automatically enable shell completion for their included scripts (using shcompgen) at installation time, so you can immadiately have tab completion.
shcompgen
To activate tcsh completion for this script, put:
complete genlines 'p/*/`genlines`/'
in your tcsh startup (e.g. ~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
~/.tcshrc
It is also recommended to install shcompgen (see above).
For fish and zsh, install shcompgen as described above.
Please visit the project's homepage at https://metacpan.org/release/App-genlines.
Source repository is at https://github.com/perlancar/perl-App-genlines.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-genlines
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
linespeed
perlancar <perlancar@cpan.org>
This software is copyright (c) 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::genlines, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::genlines
CPAN shell
perl -MCPAN -e shell install App::genlines
For more information on module installation, please visit the detailed CPAN module installation guide.