Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Is there something like a lorem ipsum generator?

s there something like a 'lorem ipsum generator'? I know it exists in Latex, and even in LibreOffice, but I'm looking for a terminal command. I would like to type something like loremipsum 10 >> file1.txt that would give me the first 10 paragraphs of lorem ipsum, each paragraph ended with one LF-character and 1 empty white line between each paragaph. And the output would be redirected to a file called file1.txt in the current directory.
by

1 Answer

vishaljlf39
You can use the perl library libtext-lorem-perl. Here a short example, feel free to expand it to parse command line arguments, etc.
#!/usr/bin/env perl

use Text::Lorem;

my $text = Text::Lorem->new();
$paragraphs = $text->paragraphs(10);

print $paragraphs;

Login / Signup to Answer the Question.