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:attribsattributes mask; valid flags are -ACEHIORS
/Bdiscard blank lines
/Cshow line repeat counts
/CP:ninterpret non-Unicode input text using code page n
/Dshow only repeating lines
/Hdisplay filenames
/Iignore case when comparing lines
/Mmerge repeating lines (default)
/Ndisable features
/Ppage output
/Ssearch in subdirectories for matching files
/Ttrim leading and trailing whitespace
/Ushow 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.

/N disables features:

/NBdo not write a Byte Order Mark
/NCdisable highlight
/NDdo not search into hidden directories; only useful with /S
/NFsuppress the file-not-found error
/NJdo not search into junctions; only useful with /S
/NZdo not search into system directories; only useful with /S

You can combine these, e.g. /NDJ.