[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep fails to return match if a file wildcard fails
From: |
Andrew Daviel |
Subject: |
grep fails to return match if a file wildcard fails |
Date: |
Mon, 23 Aug 2010 16:24:41 -0700 (PDT) |
(this looks to me like a bug in grep - at least, it behaves contrary to
my expectations)
# grep --version
grep (GNU grep) 2.5.1
In the tests below, /etc/modprobe.conf exists and contains the
line with "x25".
The directory /etc/modprobe.d does not exist
$ grep x25 /etc/modprobe.conf /etc/modprobe.d/*
grep: No match.
- I expect to see a match from modprobe.conf, as below
$ grep x25 /etc/modprobe.conf
install ax25 /bin/true
$ grep x25 /etc/modprobe.d/s
grep: /etc/modprobe.d/s: No such file or directory
$ grep x25 /etc/modprobe.conf /etc/modprobe.d/s
/etc/modprobe.conf:install ax25 /bin/true
grep: /etc/modprobe.d/s: No such file or directory
- as expected
--
Andrew Daviel, TRIUMF, Canada
Tel. +1 (604) 222-7376 (Pacific Time)
Network Security Manager
- grep fails to return match if a file wildcard fails,
Andrew Daviel <=