App-nauniq

 view release on metacpan or  search on metacpan

script/nauniq  view on Meta::CPAN

            if ($@) {
                warn "Invalid regex pattern in --forget-pattern: $@\n"; exit 99;
            }
            $Opts{forget_pattern} = $val;
        },
        'md5'              => \$Opts{md5},
        'read-output'      => \$Opts{read_output},
        'help|h'           => sub {
            print <<USAGE;
Usage:
  nauniq [OPTIONS]... [INPUT [OUTPUT]]
  nauniq --help
Options:
  --repeated, -d
  --ignore-case, -i
  --num-entries=N, -n
  --skip-chars=N, -s
  --unique, -u
  --check-chars=N, -w
  --append
  --read-output

script/nauniq  view on Meta::CPAN

=head1 NAME

nauniq - Non-adjacent uniq

=head1 VERSION

This document describes version 0.111 of nauniq (from Perl distribution App-nauniq), released on 2023-12-27.

=head1 SYNOPSIS

 nauniq [OPTION]... [INPUT [OUTPUT]]

=head1 DESCRIPTION

C<nauniq> is similar to the Unix command C<uniq> but detects repeated lines even
if they are not adjacent. To do this, C<nauniq> must remember the lines being
fed to it. It's basically a glorified form of something like these:

 % awk '!mem[$0]++' INPUT
 % perl -ne'print unless $mem{$_}++' INPUT

There are options to control memory usage: option to only remember a certain
number of unique lines, option to remember a certain number of characters for
each line, and option to only remember the MD5 hash (instead of the content) of
each line. There are also other options like append, forget, and so on.

=head1 EXIT CODES

0 on success.



( run in 0.414 second using v1.01-cache-2.11-cpan-4e96b696675 )