/usr/bin/lorem is in libtext-lorem-perl 0.3-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
use strict;
use vars qw($opt_v $opt_w $opt_s $opt_p);
use Getopt::Std;
use Text::Lorem;
getopts("vw:s:p:");
if ($opt_v) {
print usage();
exit 0;
}
die usage()
if ((defined($opt_w) + defined($opt_s) + defined($opt_p)) > 1);
my $lorem = Text::Lorem->new;
if ($opt_w) {
print $lorem->words($opt_w);
}
elsif ($opt_s) {
print $lorem->sentences($opt_s);
}
elsif ($opt_p) {
print $lorem->paragraphs($opt_p);
}
else {
print $lorem->paragraphs(1);
}
sub usage {
return <<USAGE;
$0 - Generate random Latin looking text using Text::Lorem
Usage:
$0 -w NUMBER_OF_WORDS
$0 -s NUMBER_OF_SENTENSES
$0 -p NUMBER_OF_PARAGRAPHS
-w, -s, and -p are mutually exclusive.
USAGE
}
__END__
=head1 NAME
lorem - Generate random Latin looking text using Text::Lorem
=head1 SYNOPSIS
Generate 3 paragraphs of Latin looking text:
$ lorem -p 3
Generate 5 Latin looking words:
$ lorem -w 5
Generate a Latin looking sentence:
$ lorem -s 1
=head1 DESCRIPTION
F<lorem> is a simple command-line wrapper around the C<Text::Lorem>
module. It provides the same three basic methods: Generate C<words>,
generate C<sentences>, and generate C<paragraphs>.
|