bug-grep
[Top][All Lists]
Advanced

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

[bug #18421] grep does'nt search pattern from first file of * set


From: Mikko Mallat
Subject: [bug #18421] grep does'nt search pattern from first file of * set
Date: Thu, 30 Nov 2006 12:21:58 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727)

URL:
  <http://savannah.gnu.org/bugs/?18421>

                 Summary: grep does'nt search pattern from first file of *
set
                 Project: grep
            Submitted by: mikkom
            Submitted on: Thursday 11/30/06 at 12:21
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Proof of concept

Create three files in empty dir. When trying to search contents of first
file, grep ignores it. When the first file is moved to the last grep finds
it's content but now misses the "second" on ls -l list.

Tested on RHES 3 and SLES 9.3, according to 'info grep' both show version
2.5.1 for gnu grep.


address@hidden greptest]# echo string1 > file1
address@hidden greptest]# echo string2 > file2
address@hidden greptest]# echo string3 > file3
address@hidden greptest]# grep -e "string1" -f *
address@hidden greptest]# grep -e "string2" -f *
file2:string2
address@hidden greptest]# grep -e "string3" -f *
file3:string3
address@hidden greptest]# cat file1
string1
address@hidden greptest]# grep -e "string1" -f *
address@hidden greptest]# mv file1 file4
address@hidden greptest]# grep -e "string1" -f *
file4:string1
address@hidden greptest]#
address@hidden greptest]# ls -l
total 12
-rw-r--r--    1 root     root            8 Nov 30 13:54 file2
-rw-r--r--    1 root     root            8 Nov 30 13:54 file3
-rw-r--r--    1 root     root            8 Nov 30 13:54 file4
address@hidden greptest]# grep -e "string2" -f *
address@hidden greptest]#


rgrds,
Mikko Mallat
YIT Tietotekniikka Oy





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18421>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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