bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with grep -vl


From: Mark Perry
Subject: problem with grep -vl
Date: Mon, 24 Nov 2008 13:50:41 +0100

Hello,
in the output below the grep option "-l" is used both with and with the 
option "-v".

In the first example the "grep -l" locates the files that contain the 
string "QETH_OPTIONS", note these 3 files end 0600,0700,0800.

In the 2nd example the "grep -vl" locates _ALL_ files because the 
previously matching string in not in the first line of any of the files.
Note that it again lists files ending 0600,0700,0800 even though we know 
from example 1 that these files _DO_ contain the match string.

I know that "-l" is suppose to stop on the first match, but when combined 
with "-v" should it not search all lines for a possible match?

ihlscoh1:/etc/sysconfig/hardware # grep -l QETH_OPTIONS *
hwcfg-qeth-bus-ccw-0.0.0600
hwcfg-qeth-bus-ccw-0.0.0700
hwcfg-qeth-bus-ccw-0.0.0800
ihlscoh1:/etc/sysconfig/hardware # grep -vl QETH_OPTIONS *
config
hwcfg-dasd-bus-ccw-0.0.1000
hwcfg-dasd-bus-ccw-0.0.1001
hwcfg-dasd-bus-ccw-0.0.1002
hwcfg-dasd-bus-ccw-0.0.1100
hwcfg-dasd-bus-ccw-0.0.1101
hwcfg-qeth-bus-ccw-0.0.0600
hwcfg-qeth-bus-ccw-0.0.0700
hwcfg-qeth-bus-ccw-0.0.0800
hwcfg-qeth-bus-ccw-0.0.8000
hwcfg-qeth-bus-ccw-0.0.8100
hwcfg-qeth-bus-ccw-0.0.8200
hwcfg-qeth-bus-ccw-0.0.8300
ihlscoh1:/etc/sysconfig/hardware # 

Mit freundlichen Grüßen/Regards 
Mark Perry 

Mark Perry 
Consultant - engaged by L.A. International
Project SAP on System z
Customer Oriented Validation
 
Mail:address@hidden
BB-Lab Tel: (+49)-7031-16-1785 
 
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294



reply via email to

[Prev in Thread] Current Thread [Next in Thread]