NAME

sort-by-lines - Sort lines of text by other lines of text as keys

VERSION

This document describes version 0.001 of sort-by-lines (from Perl distribution App-SortByLines), released on 2019-05-18.

SYNOPSIS

% sort-by-lines [OPTION]... FILE1 FILE2

Sample command:

% sort-by-lines file.txt <(perl -nE'say length' file.txt)

You can use "-" (in at most one of the files) to mean standard input. Tip: You can use process substitution in bash.

Sample input file file.txt:

one
two
three
four

Sample output:

one
two
four
three

DESCRIPTION

This utility sorts lines of text by other lines of text as keys.

EXIT CODES

0 on success.

1 on I/O error.

99 on command-line options error.

OPTIONS

--ignore-case, -i
--numeric-sort, -n
--reverse, -r

FAQ

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-SortByLines.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-SortByLines.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-SortByLines

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.

SEE ALSO

Unix command sort.

https://en.wikipedia.org/wiki/Schwartzian_transform in Perl 5.

Unary sort or "sort by" implementations in other languages like Perl 6, Python, etc.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 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.