> then I want to cut out the files which don't contain the string 'NOIADM'.
> 
> So I did:
> 
> for i in `cat /tmp/iadmos` ; do egrep -lv 'NOIADM' $i ; done 
> 
> which gave me all 28 file name. I wondered about it, so I tried:
> 
> for i in `cat /tmp/iadmos` ; do egrep -l 'NOIADM' $i ; done
> 
> which gave me 4 file i checked them they contain 'NOIADM' but why first egrep 
> finds that they don't?

-lv lists files which contain a non-matching line. You want -L.

-- 
gentoo-user@gentoo.org mailing list

Reply via email to