App-SortByLines
view release on metacpan or search on metacpan
script/sort-by-lines view on Meta::CPAN
'numeric-sort|n' => \$Opts{numeric},
'reverse|r' => \$Opts{reverse},
'help|h' => sub {
print <<USAGE;
Usage:
sort-by-lines [OPTIONS]... FILE1 FILE2
Examples:
# Sort by length of lines
% sort-by-lines -n file.txt <(perl -nE'say length' file.txt)
Options:
--ignore-case, -f
--numeric-sort, -n
--reverse, -r
For more details, see the manpage/documentation.
USAGE
exit 0;
},
script/sort-by-lines view on Meta::CPAN
=head1 VERSION
This document describes version 0.002 of sort-by-lines (from Perl distribution App-SortByLines), released on 2019-05-18.
=head1 SYNOPSIS
% sort-by-lines [OPTION]... FILE1 FILE2
Sample command:
% sort-by-lines file.txt <(perl -nE'say length' file.txt)
You can use C<"-"> (in at most one of the files) to mean standard input. Tip:
You can use process substitution in bash.
Sample input file F<file.txt>:
one
two
three
four
( run in 0.918 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )