Use the alternative dictionary file.
.TP
.BR \-d , " \-\-alphanum"
-Use normal dictionary character set and order, i.e. only alphanumeric characters
-are compared. (This is on by default if no file is specified.)
+Use normal dictionary character set and order, i.e. only blanks and
+alphanumeric characters are compared. This is on by default if no file is
+specified.
+
+Note that blanks have been added to dictionary character set for
+compatibility with \fBsort \-d\fR command since version 2.28.
.TP
.BR \-f , " \-\-ignore\-case"
-Ignore the case of alphabetic characters. (This is on by default if no file is
-specified.)
+Ignore the case of alphabetic characters. This is on by default if no file is
+specified.
.TP
.BR \-t , " \-\-terminate " \fIcharacter\fR
Specify a string termination character, i.e. only the characters
.SH "SEE ALSO"
.BR grep (1),
.BR sort (1)
-.SH COMPATIBILITY
-The original manual page stated that tabs and blank characters participated
-in comparisons when the \fB\-\-alphanum\fR option was specified. This was
-incorrect, and the current man page matches the historic implementation.
.SH HISTORY
The
.B look
/* Reformat string string to avoid doing it multiple times later. */
if (dflag) {
for (readp = writep = string; (ch = *readp++) != 0;) {
- if (isalnum(ch))
+ if (isalnum(ch) || isblank(ch))
*(writep++) = ch;
}
*writep = '\0';
p = comparbuf;
i = stringlen;
while(s2 < s2end && *s2 != '\n' && i) {
- if (!dflag || isalnum(*s2))
+ if (!dflag || isalnum(*s2) || isblank(*s2))
{
*p++ = *s2;
i--;
fputs(USAGE_OPTIONS, out);
fputs(_(" -a, --alternative use the alternative dictionary\n"), out);
- fputs(_(" -d, --alphanum compare only alphanumeric characters\n"), out);
+ fputs(_(" -d, --alphanum compare only blanks and alphanumeric characters\n"), out);
fputs(_(" -f, --ignore-case ignore case differences when comparing\n"), out);
fputs(_(" -t, --terminate <char> define the string-termination character\n"), out);