Quantcast
Viewing all articles
Browse latest Browse all 4890

Troubleshooting • Re: look giving strange results

Actually ame I did read the man page before posting here.
Well, the man page describes what the software does. To answer your question "Having used 'look' on a Linux system for over 20 years I'm not used to this and am wondering if it is wide spread or just something flukey about my system."

If the man page tells you it behaves differently to the way you have been expecting after using it for 20 years then it would explain the problem. If the man page tells you it behaves a certain way, and it actually doesn't, then that also answers the question.

To be honest, I think the answer is here:

Code:

DESCRIPTION       The  look utility displays any lines in file which contain       string.  As look performs a binary search,  the  lines  in       file  must be sorted (where sort(1) was given the same op‐       tions -d and/or -f that look is invoked with).       If file is not specified, the  file  /usr/share/dict/words       is used, only alphanumeric characters are compared and the       case of alphabetic characters is ignored.
Reading that, and looking at /usr/share/dict/words you can see that the problem is with the words file, which has not been sorted properly. Or rather, has not been sorted in a way which permits look to work. i.e. look is not broken, but the file it defaults to is.

Statistics: Posted by ame — Mon Feb 12, 2024 2:13 am



Viewing all articles
Browse latest Browse all 4890

Trending Articles