From unknown Thu Aug 14 20:53:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15937 <15937@debbugs.gnu.org> To: bug#15937 <15937@debbugs.gnu.org> Subject: Status: inconsistent behavior when using the -f option Reply-To: bug#15937 <15937@debbugs.gnu.org> Date: Fri, 15 Aug 2025 03:53:22 +0000 retitle 15937 inconsistent behavior when using the -f option reassign 15937 grep submitter 15937 Aaron Selk severity 15937 normal tag 15937 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 20 15:17:25 2013 Received: (at submit) by debbugs.gnu.org; 20 Nov 2013 20:17:25 +0000 Received: from localhost ([127.0.0.1]:35182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VjEDD-0002Qc-LV for submit@debbugs.gnu.org; Wed, 20 Nov 2013 15:17:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38742) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VjDs2-0001qK-Kc for submit@debbugs.gnu.org; Wed, 20 Nov 2013 14:55:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjDrt-0004Dv-Ao for submit@debbugs.gnu.org; Wed, 20 Nov 2013 14:55:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,HTML_MESSAGE, RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36473) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjDrt-0004Do-5h for submit@debbugs.gnu.org; Wed, 20 Nov 2013 14:55:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjDro-0000lz-Kh for bug-grep@gnu.org; Wed, 20 Nov 2013 14:55:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjDrj-0004Cb-Ka for bug-grep@gnu.org; Wed, 20 Nov 2013 14:55:15 -0500 Received: from mail.generalplastics.com ([69.164.165.18]:51553 helo=MAILX.generalplastics.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjDrj-0004BK-47 for bug-grep@gnu.org; Wed, 20 Nov 2013 14:55:11 -0500 Received: from MAILX.generalplastics.com ([fe80::a59d:9087:f448:d2e0]) by MAILX.generalplastics.com ([fe80::a59d:9087:f448:d2e0%12]) with mapi id 14.01.0438.000; Wed, 20 Nov 2013 11:34:52 -0800 From: Aaron Selk To: "bug-grep@gnu.org" Subject: inconsistent behavior when using the -f option Thread-Topic: inconsistent behavior when using the -f option Thread-Index: Ac7mJQwU3XQyWPEbQQ6+XUFRNEHtTw== Date: Wed, 20 Nov 2013 19:34:51 +0000 Message-ID: <2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4@MAILX.generalplastics.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.2.5.131] Content-Type: multipart/related; boundary="_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_"; type="multipart/alternative" MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 20 Nov 2013 15:17:22 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: multipart/alternative; boundary="_000_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_" --_000_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The following command produces matches. # egrep ^[\[].+[\]] /var/log/apache2/error.log However, if I save the pattern to a file and use the -f option, it produces= no matches. I have to change the pattern to this: ^[\[].+\] Notice I had to remove the enclosing square brackets to get the literal clo= sing bracket to match when using the -f option. This is on a Debian Squeeze system. Below is the package information. I am = happy to provide more details if you needed. # apt-cache show grep Package: grep Essential: yes Priority: required Section: utils Installed-Size: 1148 Maintainer: Anibal Monsalve Salazar Architecture: amd64 Version: 2.6.3-3+squeeze1 Provides: rgrep Depends: dpkg (>=3D 1.15.4) | install-info Pre-Depends: libc6 (>=3D 2.3) Suggests: libpcre3 (>=3D 7.7) Conflicts: rgrep Filename: pool/main/g/grep/grep_2.6.3-3+squeeze1_amd64.deb Size: 313920 MD5sum: 7c8b301e28fc614cd99b04ea87ad0fee SHA1: 7ebde8d23c4efe40d6744ec9f79133c37b7d2150 SHA256: e0bb207f1446f5b560540df30cee048fe623b5de164c5e035323cffb59de1736 Description: GNU grep, egrep and fgrep 'grep' is a utility to search for text in files; it can be used from the command line or in scripts. Even if you don't want to use it, other packag= es on your system probably will. . The GNU family of grep utilities may be the "fastest grep in the west". GNU grep is based on a fast lazy-state deterministic matcher (about twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper search for a fixed string that eliminates impossible text from being considered by the full regexp matcher without necessarily having to look at every character. The result is typically many times faster than Unix grep or egrep. (Regular expressions containing backreferencing will run more slowly, however.) Homepage: http://www.gnu.org/software/grep/ Tag: implemented-in::c, interface::commandline, role::program, scope::utili= ty, suite::gnu, use::searchin Package: grep Essential: yes Status: install ok installed Priority: required Section: utils Installed-Size: 768 Maintainer: Anibal Monsalve Salazar Architecture: amd64 Version: 2.6.3-3 Provides: rgrep Depends: dpkg (>=3D 1.15.4) | install-info Pre-Depends: libc6 (>=3D 2.3) Suggests: libpcre3 (>=3D 7.7) Conflicts: rgrep Description: GNU grep, egrep and fgrep 'grep' is a utility to search for text in files; it can be used from the command line or in scripts. Even if you don't want to use it, other packag= es on your system probably will. . The GNU family of grep utilities may be the "fastest grep in the west". GNU grep is based on a fast lazy-state deterministic matcher (about twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper search for a fixed string that eliminates impossible text from being considered by the full regexp matcher without necessarily having to look at every character. The result is typically many times faster than Unix grep or egrep. (Regular expressions containing backreferencing will run more slowly, however.) Homepage: http://www.gnu.org/software/grep/ Aaron Selk Information Services 4910 Burlington Way Tacoma, WA 98409 Ph: 253.473.5000 Fax: 253.473.5104 www.generalplastics.com [emailsig-logo] [facebook_resized] [twitter_resi= zed] [linkedin_resized] [youtube_resized] The contents of this electronic message and any attachments are considered = confidential and are intended only for the use of the individual or entity identified above. If the reader of this message is not the intended recipie= nt, you are hereby notified that any dissemination, distribution or copying= of this communication is strictly prohibited. If you have received this e-mail in e= rror, please notify the sender and delete this message, as well as any atta= chments. --_000_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The following command produces matches.

# egrep ^[\[].+[\]] /var/log/apache2/error.log

 

However, if I save the pattern to a file and use the= –f option, it produces no matches.

I have to change the pattern to this:

^[\[].+\]

 

Notice I had to remove the enclosing square brackets= to get the literal closing bracket to match when using the –f option= .

This is on a Debian Squeeze system. Below is the pac= kage information. I am happy to provide more details if you needed.

# apt-cache show grep

 

Package: grep

Essential: yes

Priority: required

Section: utils

Installed-Size: 1148

Maintainer: Anibal Monsalve Salazar <anibal@debia= n.org>

Architecture: amd64

Version: 2.6.3-3+squeeze1

Provides: rgrep

Depends: dpkg (>=3D 1.15.4) | install-info

Pre-Depends: libc6 (>=3D 2.3)

Suggests: libpcre3 (>=3D 7.7)

Conflicts: rgrep

Filename: pool/main/g/grep/grep_2.6.3-3+squeeze1= _amd64.deb

Size: 313920

MD5sum: 7c8b301e28fc614cd99b04ea87ad0fee<= /p>

SHA1: 7ebde8d23c4efe40d6744ec9f79133c37b7d2150<= /o:p>

SHA256: e0bb207f1446f5b560540df30cee048fe623b5de164c= 5e035323cffb59de1736

Description: GNU grep, egrep and fgrep

'grep' is a utility to search for text in files; it = can be used from the

command line or in scripts.  Even if you don't = want to use it, other packages

on your system probably will.

.

The GNU family of grep utilities may be the "fa= stest grep in the west".

GNU grep is based on a fast lazy-state deterministic= matcher (about

twice as fast as stock Unix egrep) hybridized with a= Boyer-Moore-Gosper

search for a fixed string that eliminates impossible= text from being

considered by the full regexp matcher without necess= arily having to

look at every character. The result is typically man= y times faster

than Unix grep or egrep. (Regular expressions contai= ning backreferencing

will run more slowly, however.)

Homepage: http://www.gnu.org/software/grep/

Tag: implemented-in::c, interface::commandline, role= ::program, scope::utility, suite::gnu, use::searchin

 

Package: grep

Essential: yes

Status: install ok installed

Priority: required

Section: utils

Installed-Size: 768

Maintainer: Anibal Monsalve Salazar <anibal@debia= n.org>

Architecture: amd64

Version: 2.6.3-3

Provides: rgrep

Depends: dpkg (>=3D 1.15.4) | install-info

Pre-Depends: libc6 (>=3D 2.3)

Suggests: libpcre3 (>=3D 7.7)

Conflicts: rgrep

Description: GNU grep, egrep and fgrep

'grep' is a utility to search for text in files; it = can be used from the

command line or in scripts.  Even if you don't = want to use it, other packages

on your system probably will.

.

The GNU family of grep utilities may be the "fa= stest grep in the west".

GNU grep is based on a fast lazy-state deterministic= matcher (about

twice as fast as stock Unix egrep) hybridized with a= Boyer-Moore-Gosper

search for a fixed string that eliminates impossible= text from being

considered by the full regexp matcher without necess= arily having to

look at every character. The result is typically man= y times faster

than Unix grep or egrep. (Regular expressions contai= ning backreferencing

will run more slowly, however.)

Homepage: http://www.gnu.org/software/grep/

 

 

Aaron Selk<= /p>

Information Services

4910 Burlington Way

Tacoma, WA 98409

Ph: 253.473.5000

Fax: 253.473.5104

www.generalplastics.com

 

     = ;            &n= bsp;             3D"twitter_resized" = 3D"linkedin_resized" 3D"yout=

 

The contents of this electronic message and any attachments are conside= red confidential and are intended only for the use of the individual or entity

identified above. If the reader of this message is not the intended rec= ipient, you are hereby notified that any dissemination, distribution or copying of this

communication is strictly = prohibited. If you have received this e-mail in error, please notify the se= nder and delete this message, as well as any attachments.

 

--_000_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_-- --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: image/jpeg; name="image001.jpg" Content-Description: image001.jpg Content-Disposition: inline; filename="image001.jpg"; size=5161; creation-date="Wed, 20 Nov 2013 19:34:51 GMT"; modification-date="Wed, 20 Nov 2013 19:34:51 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMg IyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAA9AQcDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA Aw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ttPr0rf/4RzRh9n/4ldl/orFoP3C/uiTkleOOefrVu50+0vJYJLq2imeBt8TOoJRsY yPTigDzIePtUhujrF0sDxnRBdR2dvOxj3PMqqXyOGAbmtZfH2pfZhFNa2kF8bswKHWVhIoj3lhGo LAjuDjjmusg8NaLbCQQaTYxiVDG4SBQGUnJU8cgntSDwxoi2qWy6RYiBH8xYxAu0P/exjr70AcV/ ws6/a2srs6fbw2kkEcs0rF3UFnKNyoOwDHBYc5rY+J63MHg+51Oy1G9s57Fd6C2m2LJuZR83rjtW 5/wi+iboG/sixJgGIiYF+QZzgcepJq9eWVtqFpJa3kEc9vIMPHIoZW78g0AcBqXiq68GWgtbe4/t LyLVbuY3skkkx3tjbuVdqj0JPtTdH8Z3kPibVdPk3zxrdXVxunc/LFGikRRerZOSOw5rt7zw/pOo SCS9020uHVPLDSQqxC+mSOlOGh6YJVkFhbCRZjOG8sZEhGC2fUgYzQBzvgvxjf8AiS5Md7YRQJJa pdRPGx6McbSDye3zDg1yHiTWtSsNf1e7m1i8Npa3SLGLG/jXyF4G1oG5c16lYaLpmlSSPp+n2tq8 v32hiVC31wKjuPDmjXd+L240qyluxg+c8Cl+OnOKAOL07xbqWn63drcbLjT59bmtA80rb4QIw4Cj GAoAP50xfibfixv52tbOUw6d9vhaMSqpHmBNp3gFhg5DDiu7Oi6aX3mxty3nm4z5Y/1pGC/+9jjN ZeqeCdJvdGvLGytbbT3uojCZ4IFDKpYMR24yBxQBzlx8RtTguXsBY2Ut79rSFJIHeSLa0Rk7DJYd MCux8N6rLrfh+01Ce3FvLMpLxBwwUgkHB7jikTwxowsDZtpVk1uz+Y8fkLtZ/wC8Rjr71oW9tDZ2 6QW0McMMY2pHGoVVHoAKAJaKKKACiiigAooooA//2Q== --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: image/jpeg; name="image002.jpg" Content-Description: image002.jpg Content-Disposition: inline; filename="image002.jpg"; size=803; creation-date="Wed, 20 Nov 2013 19:34:51 GMT"; modification-date="Wed, 20 Nov 2013 19:34:51 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMg IyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAAUABQDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDnSSxJ YkknJJ710Ph3RNOvNLv9U1e4mjtLNlQrABuJP/6xXPhGIyFYj6V6B4f1ya38A38osbVmsmSNVaM4 l6cuO55rvqNpaEI4tZ/KlmFlNMtv5jGP5iCV7E474xRTHlaeeaZ0VGkkLlVGAM84A9KKqwFiS4lt ZXgjf5ImKLkDOAali8Q38FlNYpInkTkM4KDOR7/hRRSaQF7SNIh1e2e4uZJQ4k2fIQBgAe3vRRRU Nu4H/9k= --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: image/jpeg; name="image003.jpg" Content-Description: image003.jpg Content-Disposition: inline; filename="image003.jpg"; size=799; creation-date="Wed, 20 Nov 2013 19:34:51 GMT"; modification-date="Wed, 20 Nov 2013 19:34:51 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMg IyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAAUABQDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD0KOaS +1a5R7mREiycI2O+MVHeW9/bmR45pJIF5DeZzj6VXtfl1nUAv+scMEH94h84H4Vo3Dl7GZVtpbd/ KbMrqcdORz69Pxrq1TRwaSTvvqWdEvJLiw3O28hiASc+lFVvDQ26WR/tn+QormqaSZ2UXenFsNR0 i3N40gLqX+YgEYB/Kq76cjja0sxHoSP8KKKtSlbczlCN3oblhZxWdqscYJB+YlupNFFFZm60Vkf/ 2Q== --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: image/jpeg; name="image004.jpg" Content-Description: image004.jpg Content-Disposition: inline; filename="image004.jpg"; size=823; creation-date="Wed, 20 Nov 2013 19:34:51 GMT"; modification-date="Wed, 20 Nov 2013 19:34:51 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMg IyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAAUABQDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDcXVI7 qwurye8cXKv8sewkPnHft1qn/ac+GOyXCDLfKflHv6U/Q2Y/DjVjk5+1x/zjrqZdVu/+Fjx6Z5g+ xPaFmj2j5jg8k9e1djlZtWOP2d7amFp3ii5htykc3yhuAecdKK5h1EF9fRR/KiXMiqPQA8UVXJF6 2EnJaXLXiHRoNN1m6tLWWdYA24Jv4GecfhWd9mPmb/tE+/pu38/nRRVx2Qnueg+FPCemTaFHPcRv NLMxdmdufTHH0ooorinJ8z1OqEVyrQ//2Q== --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_ Content-Type: image/jpeg; name="image005.jpg" Content-Description: image005.jpg Content-Disposition: inline; filename="image005.jpg"; size=871; creation-date="Wed, 20 Nov 2013 19:34:51 GMT"; modification-date="Wed, 20 Nov 2013 19:34:51 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMg IyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAAVABUDASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD0nxkt wPDc81nO8FzAyyRupPXODnHUYJrlz4s1OwlNossbJFci2UtGSwIbbsJzy2Buz/tVc8S6nPJ4hubC K5u4TDbxNF5M/lrveQJlgASfvA/h71hxJrc8EQj1u4+0M+WBlfBQqhBHuN/PrWTqWex1wwylFNys eq0Vg+Drm6uNEK31x9omhmeIy5zuAPH6GitE7q5zTjyScTP8U+EpdT1Malaak1nKYkjdfJEgba+9 T1GOQPyrBj8LarLIV/t5FywPFio6ADH3umFHHTiiipcVc1hUlY7jw9o/9iaUtsZzO7O0jyFAmWY5 4UcAdsUUUVa0MW23dn//2Q== --_008_2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4MAILXgeneralpla_-- From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 20 19:54:17 2013 Received: (at 15937) by debbugs.gnu.org; 21 Nov 2013 00:54:17 +0000 Received: from localhost ([127.0.0.1]:35462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VjIXA-0002D3-D8 for submit@debbugs.gnu.org; Wed, 20 Nov 2013 19:54:16 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:48272) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VjIX8-0002Cq-TI for 15937@debbugs.gnu.org; Wed, 20 Nov 2013 19:54:15 -0500 Received: by mail-pa0-f47.google.com with SMTP id kq14so6188620pab.20 for <15937@debbugs.gnu.org>; Wed, 20 Nov 2013 16:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Vwr2CKlDCI237XTq1XOjEP5hBwe0Inv8kIW02fmOOks=; b=Vppj9xmVyZjFrCEVG09qzk586AC7Oikj967v6EnrlAtcrb228mKlYB35DP9g6S2xvQ AYFyAFghAGuAF0Bj8KYQSzgu134jMy4rh5hNabZhtot0WymIkUy5NFzcEhFWA3c0m65q O6eqbJS+jwaji4iuiIjsGjrCuwsRnc2P22rsUFx+NkUb6ScGw5E0+V3dE1A5iwih/RiR NNXHZDd77Tx+ubglTcsc/wKQD3lTWsxi4ub+Bh1r7nPk3n5ECMMxf59rfFwlTlLQ2v/a k8xKaAS3dAll38Ss7VtfH8BYXPddICQpXF5uUrihOSCQ1AZXc8KsymzkkcfU1yp4ZUZx ROGw== X-Received: by 10.69.1.105 with SMTP id bf9mr3433820pbd.53.1384995248510; Wed, 20 Nov 2013 16:54:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.6.66 with HTTP; Wed, 20 Nov 2013 16:53:48 -0800 (PST) In-Reply-To: <2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4@MAILX.generalplastics.com> References: <2680DFB5CC2488478E3A5F4511ADAD7E59CAE1A4@MAILX.generalplastics.com> From: Jim Meyering Date: Wed, 20 Nov 2013 16:53:48 -0800 X-Google-Sender-Auth: qqn1Stz0daSzFq62syqO1J25UOM Message-ID: Subject: Re: bug#15937: inconsistent behavior when using the -f option To: Aaron Selk Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15937 Cc: 15937@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 15937 notabug close 15937 thanks On Wed, Nov 20, 2013 at 11:34 AM, Aaron Selk wrote: > The following command produces matches. > # egrep ^[\[].+[\]] /var/log/apache2/error.log > > However, if I save the pattern to a file and use the -f option, it produces no matches. > I have to change the pattern to this: > ^[\[].+\] > > Notice I had to remove the enclosing square brackets to get the literal closing bracket to match when using the -f option. Thanks for the report, but the only problem is that you have not quoted the regular expression, and that makes it subject to evaluation by your shell. I suggest trying hard to single-quote (double-quote only when necessary) grep regular expressions that are specified on the command line. This demonstrates that a properly-quoted regexp works the same on the command line as when included as the contents of an -f-specified file: $ echo '[x]' | grep -E '^[[].+[]]' [x] $ echo '[x]' | grep -E -f <(echo '^[[].+[]]') [x] From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 08 13:06:24 2014 Received: (at control) by debbugs.gnu.org; 8 Mar 2014 18:06:24 +0000 Received: from localhost ([127.0.0.1]:56850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMLdg-0002zL-Cl for submit@debbugs.gnu.org; Sat, 08 Mar 2014 13:06:24 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:39116) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WMLdf-0002zE-6D for control@debbugs.gnu.org; Sat, 08 Mar 2014 13:06:23 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id D31B039E8018 for ; Sat, 8 Mar 2014 10:06:22 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e3T5JIObPWu6 for ; Sat, 8 Mar 2014 10:06:22 -0800 (PST) Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 85DE639E8013 for ; Sat, 8 Mar 2014 10:06:22 -0800 (PST) Message-ID: <531B5C1E.9020407@cs.ucla.edu> Date: Sat, 08 Mar 2014 10:06:22 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: 15937 is not a bug Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) tags 15937 notabug close 15937 thanks From unknown Thu Aug 14 20:53:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 06 Apr 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator