| PLEX86 | ||
|
FIND" command 3924On Sat, 18 Jun 2005 08:36:55 +0000, Alan Connor Not according to my understanding of logic and also my testing of the command. First, according to logic: Paypal requests, was Your Compliance is Urgently Needed.Reply Asap 3926 So if a customer reports such an incident, it goes no further? They don't ask for a... The 'or' logic says "match if the name doesn't end in PRT or if the name doesn't end in BAT". Now take a file ending in PRT. This fails the first condition but since it is an or, the second condition is also evaluated. The second condition matches (the file doesn't end in BAT). So overall we have a match. But we don't want it to match. If the logic were 'and' instead of 'or', then the second condition would not be tested - 'and' requires both conditions to match - and overall the match fails. I leave it up to you to consider the case where files end in BAT but you will discover the same outcome... Secondly, testing the commands: 'or' logic: $ touch x.BAT && find . -type f ! -name '*.PRT' -o ! -name'*.BAT' grep ".*-.BAT$" .-.wine-drivec-windows-Help-PINGNAME.BAT .-.wine-drivec-windows-Help-PINGNUM.BAT .-x.BAT 'and' logic: $ touch x.BAT && find . -type f ! -name '*.PRT' -a ! -name'*.BAT' grep ".*-.BAT$" FIND" command 3925 Netocrat Well, it would be very interesting anyway. The only two possible answers would be, "The find tool's logical operators are not logical," or centuries of logical thinking... No results returned. Same results for files ending in PRT... but you get the idea.
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||