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;