look -d ignores white space (with fix)
Rob McMahon
cudcv at warwick.ac.uk
Thu Jan 26 19:54:32 AEST 1989
Look's -d flag disagrees with both sort's and the manual on the treatment of
white space, which makes it error-prone when searching the output from sort.
The manual says it ignores everything except letters, digits, space and tab,
in fact it ignores space and tab too.
Fix:
RCS file: look.c,v
retrieving revision 1.1
diff -c -r1.1 look.c
*** /tmp/,RCSt1011460 Thu Jan 26 09:52:14 1989
--- look.c Tue Jan 24 21:45:14 1989
***************
*** 152,158 ****
break;
}
if(dict) {
! if(!isalnum(c))
continue;
}
if(fold) {
--- 152,158 ----
break;
}
if(dict) {
! if(!isalnum(c) && !isspace(c))
continue;
}
if(fold) {
Rob
--
UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037
JANET: cudcv at uk.ac.warwick ARPA: cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list