DEDUP
— Dump text files to
standard output, merging repeated lines.
Syntax:
DEDUP
/A:
attribs /B /C /CP:
n /D /H /I /M /N /P /S /T /U
filename…
/A: attribs | attributes mask; valid flags are -ACEHIORS |
/B | discard blank lines |
/C | show line repeat counts |
/CP: n | interpret non-Unicode input text using code page n |
/D | show only repeating lines |
/H | display filenames |
/I | ignore case when comparing lines |
/M | merge repeating lines (default) |
/N | disable features |
/P | page output |
/S | search in subdirectories for matching files |
/T | trim leading and trailing whitespace |
/U | show only lines which do not repeat |
… | Range options are also supported. |
Input filenames may be specified on the command line, or text may be
redirected or piped into DEDUP
. If you want to pipe to
DEDUP
, remember that pipes open a new shell. To pipe to a plugin
command, you must either ensure that the plugin is loaded in the transient
shell, e.g. by installing the .DLL file
in the shell’s PlugIns directory; or else
use temporary files or an in-process pipe.
You may specify more than one filename;
wildcards and directory aliases are supported. You can search recursively into
subdirectories for matching files with /S
. @File lists and
internet files are supported. You may also specify CLIP:
to read
text from the clipboard.
Options /D
, /M
, and /U
select the
operating mode. If you don’t specify one, the default is /M
.
If you specify more than one, the last one wins.
/NB | do not write a Byte Order Mark |
/NC | disable highlight |
/ND | do not search into hidden directories; only useful with /S |
/NF | suppress the file-not-found error |
/NJ | do not search into junctions; only useful with /S |
/NZ | do not search into system directories; only useful with /S |
You can combine these, e.g. /NDJ
.