TLDR Bottom line, they do nothing when used together; -dD
is identical to -D
.
Research
If you look at the case/switch logic of the uniq.c
command you can see this first hand:
case 'd':
output_unique = false;
output_option_used = true;
break;
case 'D':
output_unique = false;
output_later_repeated = true;
if (optarg == NULL)
delimit_groups = DM_NONE;
else
delimit_groups = XARGMATCH ("--all-repeated", optarg,
delimit_method_string,
delimit_method_map);
output_option_used = true;
break;
The way that this code is structured, if either -dD
is set, ouput_unique
is set to false; but more importantly, output_later_repeated
is set to true.
Once that condition is set, output_later_repeated
, there's no feasible way for -dD
to have anything but identical output to -D
.
Incidentally, the computerhope man page has a better table that explains the -d
and -D
switches.
References