From unknown Fri Jun 13 10:08:59 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#36820 <36820@debbugs.gnu.org> To: bug#36820 <36820@debbugs.gnu.org> Subject: Status: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 Reply-To: bug#36820 <36820@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:08:59 +0000 retitle 36820 grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 reassign 36820 grep submitter 36820 Jeff Chua severity 36820 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 26 20:14:53 2019 Received: (at submit) by debbugs.gnu.org; 27 Jul 2019 00:14:53 +0000 Received: from localhost ([127.0.0.1]:43491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrAMO-0006Zh-TM for submit@debbugs.gnu.org; Fri, 26 Jul 2019 20:14:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:48058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrA2Y-00066w-Ov for submit@debbugs.gnu.org; Fri, 26 Jul 2019 19:54:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56553) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrA2X-0001i1-RB for bug-grep@gnu.org; Fri, 26 Jul 2019 19:54:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrA2S-00016o-Gd for bug-grep@gnu.org; Fri, 26 Jul 2019 19:54:17 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrA2Q-0000b7-3p for bug-grep@gnu.org; Fri, 26 Jul 2019 19:54:14 -0400 Received: by mail-wr1-x42c.google.com with SMTP id f9so55941750wre.12 for ; Fri, 26 Jul 2019 16:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=X7jZ4YSEjYllh+SWxC+9CP0SVG6cqKCBG92Js5WV01Q=; b=tX3KygQt/6SUUiMGv5yWw6vt2WnVO7tmQBcckMRj9b6DxseQZf34NgghWCXXiKIrz+ WeFKf63B1D56XB1mSIyysaj5Qsi2wBicfUFXuFYIejuB+/0aEU7NaV1jDGdq+tdJnflb d23S1CYx3W3dqf5JaCy+mX8mIsbrx5bORUv8AOITbWWM7kqW3HBoK93Tvnl3CmI7Tz4d UdXDNxN/ASY2SKCP9OjuZL550HNHaV2ig1wEbWJen/uKC8oFen2cOSD8keL+qNnHyFO4 4wpN67xbk3in66Zcobz9mkGIU4C3u79wuCW22VHZJAA3xFmL6vLsq9aHywA6kIp2BXNy jv+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=X7jZ4YSEjYllh+SWxC+9CP0SVG6cqKCBG92Js5WV01Q=; b=GWx5FX7KHzGygW6Vywsdgzp2CVx/kwLOlWLF+X4HNA+ea9TlJhh9Tygl1ean6ZTusX IKMMBMDkvfCKH4+td0F0m30lQJr0bIrF4rD2x13c2JORTjCJbSQw+f2hztUELd9P0cpW 33bF+yktZJm33en83P+lQIaxQtl+lnxmpCxn6B07UOXpeRIlFkcLoeTNEE+86rWnSDNJ mFrRbtDSSuvGD08a/zhGLIh29Rsw+WQjp5+vuRhvnR5pxRd4Mmn1YxofNxjovdHDcCUn AlVP+ruMmdGmd4M8Hp9b9ZbG0lwguY3Vk8wu+408teN/u//sZAD2vinGNndXqXt1HK5c Ls9Q== X-Gm-Message-State: APjAAAVqMoHVzREQPSoSdEXSJrnExq4J+kOQJcFbhYsRaC9fYnd7SQLz ikdDOy20MIRdQ82rLu390brIazxmZ4w5FiEgV03RZCG/aYc= X-Google-Smtp-Source: APXvYqzlPA9RXvvu3qwvfdjpuQQYf3dT7btqsAUVnyavH8pBYqhzir6fDbZSVZ9KtiUGx6RX2/IGwkyEwyY//Z8q5nM= X-Received: by 2002:a5d:408c:: with SMTP id o12mr8703734wrp.176.1564185169358; Fri, 26 Jul 2019 16:52:49 -0700 (PDT) MIME-Version: 1.0 From: Jeff Chua Date: Sat, 27 Jul 2019 07:52:37 +0800 Message-ID: Subject: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 To: bug-grep@gnu.org Content-Type: multipart/alternative; boundary="00000000000061f388058e9e3dba" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 26 Jul 2019 20:14:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (--) --00000000000061f388058e9e3dba Content-Type: text/plain; charset="UTF-8" # using grep 2.20 ... # grep "[[:cntrl:]]" /proc/1/cmdline Binary file /proc/1/cmdline matches # using grep 3.3 or above 2.20 ... # grep "[[:cntrl:]]" /proc/1/cmdline ... nothing returned My best., Jeff --00000000000061f388058e9e3dba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

# using grep 2.20 ...
# grep "[[:cntrl:]]" /proc/1/cmdli= ne
Binary fil= e /proc/1/cmdline matches

# using g= rep 3.3 or above 2.20 ...
# grep "[[:cntrl:]]" /proc/1/cmdline
... noth= ing returned

<= /span>

My best.,
Jeff
--00000000000061f388058e9e3dba-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 13:16:12 2019 Received: (at 36820-done) by debbugs.gnu.org; 27 Jul 2019 17:16:12 +0000 Received: from localhost ([127.0.0.1]:45356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrQIl-0006Iq-Mj for submit@debbugs.gnu.org; Sat, 27 Jul 2019 13:16:11 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:42610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrQIj-0006IE-Am for 36820-done@debbugs.gnu.org; Sat, 27 Jul 2019 13:16:10 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3A8061626BA; Sat, 27 Jul 2019 10:16:02 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 9MScR_y9LgcO; Sat, 27 Jul 2019 10:16:01 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 87ADB1626BC; Sat, 27 Jul 2019 10:16:01 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e9w3eQEDbR2s; Sat, 27 Jul 2019 10:16:01 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 517671626BA; Sat, 27 Jul 2019 10:16:01 -0700 (PDT) Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 To: Jeff Chua , 36820-done@debbugs.gnu.org References: From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sat, 27 Jul 2019 10:16:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36820-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) This is documented behavior; the grep manual says that when grep is reading a binary file it "may treat non-text bytes as line terminators". You can use grep's -a (--text) option to if you want to match null bytes. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 11:42:28 2019 Received: (at 36820-done) by debbugs.gnu.org; 28 Jul 2019 15:42:28 +0000 Received: from localhost ([127.0.0.1]:47030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrlJc-0001nX-9J for submit@debbugs.gnu.org; Sun, 28 Jul 2019 11:42:28 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:41432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hreB2-0000GE-9R for 36820-done@debbugs.gnu.org; Sun, 28 Jul 2019 04:05:09 -0400 Received: by mail-wr1-f45.google.com with SMTP id c2so55301711wrm.8 for <36820-done@debbugs.gnu.org>; Sun, 28 Jul 2019 01:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IpepnFR3vaiXIsrXf3kDcqBYigEyPJ2QFBZl0nmcL5k=; b=G8qFm0P2EyaeHVij0fsjUi/QEBZn9zztBYr84TzwjVyYyjwlbGp9A+iIphh3I7DcTT s9Ze/KxCi1gW9FE85/ZYqIfloyQcj0nofSb542MN2Rh6KII+YgvEFvucABA76DZCNvP0 9CYw1/zRClMdY1lHcG16VI3ZXGDjY6BShFkLjl+w20cQ6RXFAA+uYLfvrqOfY/h6CC8F jsLCexs9tDl7GXpVB4yLwC4HUlym2dw0tSlZTV8A2Sxz7Y1VcvjZNQaLq2mnnxOXHWjN CBLq7m6/6KlSgRVsa0yryHoiGtKfDkjHyTVVpm6co60njtUmFZW1NUF8tvJibU4/uj/m xo0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IpepnFR3vaiXIsrXf3kDcqBYigEyPJ2QFBZl0nmcL5k=; b=ZN9tjg3GSsjNMMVUuiGnUU0Ow3jfLwZQ2VERzILUnUsbxHLxk0d8sMDgh0kTNYzSbE F+6OhbT0gH8ow9vH5B72ycP3gQ8236/c/Co8bA8WpvdAtk6PpIgW0OOTnul0xfF1oBjK Y/YPxHo6FlctlGMpbWwBvZn49yZzyRbxS9lryratgKVWco/rVItlewiAkRK/7fsLxCaq 9rtKqL9/CTIg2XSV9RBO8LE4Ahjx67oI2nm07poft2ARCQrX9aNUbXl2nkFJzB+S9pFN KN57mGL37rPB5pVPjiOTufOr34tuIiTIzOXqFJ1wFRYfo3K4wRYjZ6YyiZ6lRoM44S2s hp6w== X-Gm-Message-State: APjAAAXF15nbCmtv8hn3Da5id9Z739MVnUrV/7BUrBMGNNLUWuPxup81 hJ0TTx7DrIVQ9Cl/Rp3jtvqtjjIWT6X115zL0HA= X-Google-Smtp-Source: APXvYqwHNl3EiiHAS+cHV1F1yxJFTe3tE5ckwg/arlD/un5Excz3ReYSABJLhVb+HtcCjtxpVxCBrcSdhK4U9LAsvCs= X-Received: by 2002:a5d:408c:: with SMTP id o12mr17070949wrp.176.1564301102149; Sun, 28 Jul 2019 01:05:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jeff Chua Date: Sun, 28 Jul 2019 16:04:48 +0800 Message-ID: Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 To: Paul Eggert Content-Type: multipart/alternative; boundary="00000000000083f553058eb93b7d" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36820-done X-Mailman-Approved-At: Sun, 28 Jul 2019 11:42:26 -0400 Cc: 36820-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --00000000000083f553058eb93b7d Content-Type: text/plain; charset="UTF-8" > This is documented behavior; the grep manual says that when grep is reading a binary file it "may treat non-text bytes as line terminators". > You can use grep's -a (--text) option to if you want to match null bytes. Paul, Thanks for pointing this out. Didn't know that as it works on 2.20. Then if it's binary file, grep should default to "-a" to make it compatible with the old behavior? My best., Jeff On Sun, Jul 28, 2019 at 1:16 AM Paul Eggert wrote: > This is documented behavior; the grep manual says that when grep is > reading a > binary file it "may treat non-text bytes as line terminators". > > You can use grep's -a (--text) option to if you want to match null bytes. > --00000000000083f553058eb93b7d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> This is documented behavior; the grep = manual says that when grep is reading a
binary file it "may treat non-text bytes as line terminators".
&g= t; <= /span> You can use grep's -a (--text) option to if you want to match null byte= s.

Paul,

Thanks for pointing this out. Didn't know that as it= works on 2.20.

Then if it's binary file, grep should default to &= quot;-a" to make it compatible with the old behavior?

My best.,
Jeff


On Sun, Jul 28, 2019 at 1:16 AM P= aul Eggert <eggert@cs.ucla.edu= > wrote:
T= his is documented behavior; the grep manual says that when grep is reading = a
binary file it "may treat non-text bytes as line terminators".
= You can use grep's -a (--text) option to if you want to match null byte= s.
--00000000000083f553058eb93b7d-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 28 19:00:12 2019 Received: (at 36820) by debbugs.gnu.org; 28 Jul 2019 23:00:12 +0000 Received: from localhost ([127.0.0.1]:47352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrs9D-0005kQ-Mx for submit@debbugs.gnu.org; Sun, 28 Jul 2019 19:00:12 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrs96-0005ZT-8L for 36820@debbugs.gnu.org; Sun, 28 Jul 2019 19:00:06 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1EE13160F0D; Sun, 28 Jul 2019 15:59:58 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4IhSg5qayfsn; Sun, 28 Jul 2019 15:59:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6C26F161BD0; Sun, 28 Jul 2019 15:59:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I1K-HU_IuBOY; Sun, 28 Jul 2019 15:59:57 -0700 (PDT) Received: from [192.168.0.8] (ip72-206-6-38.fv.ks.cox.net [72.206.6.38]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2B212160F0D; Sun, 28 Jul 2019 15:59:57 -0700 (PDT) Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 To: Jeff Chua References: From: Paul Eggert Message-ID: <171cc7e0-cca5-e14a-2679-1d87227270c0@cs.ucla.edu> Date: Sun, 28 Jul 2019 17:59:51 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36820 Cc: 36820@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) On 7/28/19 3:04 AM, Jeff Chua wrote: > Then if it's binary file, grep should default to "-a" No, as that would mean the default output of grep would not be text, and this could mess up terminals etc. This is partly why -a has never been the default. If you want -a behavior you can use -a. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 29 10:39:01 2019 Received: (at 36820) by debbugs.gnu.org; 29 Jul 2019 14:39:01 +0000 Received: from localhost ([127.0.0.1]:48903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hs6nk-0001wB-AV for submit@debbugs.gnu.org; Mon, 29 Jul 2019 10:39:01 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:52704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hs3rh-0001wA-VK for 36820@debbugs.gnu.org; Mon, 29 Jul 2019 07:30:54 -0400 Received: by mail-wm1-f48.google.com with SMTP id s3so53485604wms.2 for <36820@debbugs.gnu.org>; Mon, 29 Jul 2019 04:30:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zBTiEW1Lm2Z4SFQLX8POOyVk1Axr0q7e2t2L/j1WkK0=; b=AET2TZ07avkNQwLbbxUMlsHm0I4IHXImg3C15i1+RsLz3CKk3dtTc4ODN0/MP1nhML UCIYh4e0HghuWzBzouHAQXyJKhuDdTl/kLqIw0aacydIaVBx1x3HVohS8ml7j0ieavvH k6SqCBNg4JMu9V8yTzyqimAMOfh65mUwOeOdxVkn3kQjEhpAhExDDYM6Q2uKrZQrz17E yhVxHwy6CH/VGgFggyfwZs2n8syBLy6VBKOP226F5MZybVXLY+bDnVP5wLoGDWv9euFg JXy28UrCDWuWOFbyt3MPUItGkOjyF4EunEoRhl7atwj2ypiYNRRggVrQwYiiSvDYkj0N 5jKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zBTiEW1Lm2Z4SFQLX8POOyVk1Axr0q7e2t2L/j1WkK0=; b=WQg+hnkBCkT9//Ec3OnIzOFYByhCg95bzMpuBtllCSTz6rRCGrH8jnDtQx1Vzhhk2k E/K8whbaBwvUs2uSjyIrpNEAM9ueeU69yZaO7jUTbKRnjoxE3kTCiOQoFqGLjeki/Fbe fWM5J7ue2EmYi0d4X4SfpZn29PYpO2/c8aK9ZMALQmQ1iMF4eMY50sNsUhaIZzeEl0QU 3eqJ4IQL4nd0Ds+tKPUmqo3TsIFMfMVSiYpr1LBLI6UqJUKqfhZlURaw8xe8so9g0mup 0EDDhRV/gd+Xi3IIsddyDLY0tWoqYwgna3QXqiW8DIhtu8aDZKqouFGg/X8WcTCIfJgl zU8A== X-Gm-Message-State: APjAAAXGLXEPQNEt98IsObpzn3WeaF9Qw4xQs78mVbynvu1wmq6k93zb bQgbuHuVOcqTdMjBLb1Plx7nQTt4MdWE4M0yf2o= X-Google-Smtp-Source: APXvYqxr46MO7NZQ+mrWxyVnF1y9zwAGmPq0HTWl+EulkhplXemKjViSjP7F2uQkdewBPTNRr7dAMfdQHlk2mQ8J/Ds= X-Received: by 2002:a1c:ca06:: with SMTP id a6mr1881575wmg.48.1564399847908; Mon, 29 Jul 2019 04:30:47 -0700 (PDT) MIME-Version: 1.0 References: <171cc7e0-cca5-e14a-2679-1d87227270c0@cs.ucla.edu> In-Reply-To: <171cc7e0-cca5-e14a-2679-1d87227270c0@cs.ucla.edu> From: Jeff Chua Date: Mon, 29 Jul 2019 19:30:36 +0800 Message-ID: Subject: Re: bug#36820: grep "[[:cntrl:]]" /proc/1/cmdline works on 2.20 but not 3.3 To: Paul Eggert Content-Type: multipart/alternative; boundary="00000000000038ab21058ed03993" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36820 X-Mailman-Approved-At: Mon, 29 Jul 2019 10:38:59 -0400 Cc: 36820@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) --00000000000038ab21058ed03993 Content-Type: text/plain; charset="UTF-8" > No, as that would mean the default output of grep would not be text, and this could mess up terminals etc. This is partly why -a has never been the default. If you want -a behavior you can use -a. Ok, thanks for the clarification. My best., Jeff On Mon, Jul 29, 2019 at 6:59 AM Paul Eggert wrote: > On 7/28/19 3:04 AM, Jeff Chua wrote: > > Then if it's binary file, grep should default to "-a" > > No, as that would mean the default output of grep would not be text, and > this could mess up terminals etc. This is partly why -a has never been > the default. If you want -a behavior you can use -a. > > --00000000000038ab21058ed03993 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> No, as that would mean the default output of grep would no= t be text, and
this could mess up terminals etc. This is partly why -a has never been
the default. If you want -a behavior you can use -a.

Ok, thanks for the clarification.

My bes= t.,
Jeff


On Mon, Jul 29, 2019 at 6:59 AM Paul Eggert = <eggert@cs.ucla.edu> wrote:=
On 7/28/19 3:04= AM, Jeff Chua wrote:
> Then if it's binary file, grep should default to "-a"
No, as that would mean the default output of grep would not be text, and this could mess up terminals etc. This is partly why -a has never been
the default. If you want -a behavior you can use -a.

--00000000000038ab21058ed03993-- From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 16 18:28:20 2019 Received: (at 36820-done) by debbugs.gnu.org; 16 Aug 2019 22:28:20 +0000 Received: from localhost ([127.0.0.1]:55128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hykho-0004vb-3M for submit@debbugs.gnu.org; Fri, 16 Aug 2019 18:28:20 -0400 Received: from mailer.hiddenmail.net ([199.195.249.9]:48474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hykhm-0004vU-UW for 36820-done@debbugs.gnu.org; Fri, 16 Aug 2019 18:28:19 -0400 Received: from mailer by mailer.hiddenmail.net with local (Exim 4.80) (envelope-from ) id 1hykhm-0007Bn-8e; Sat, 17 Aug 2019 00:28:18 +0200 Message-ID: <1565994493.1033.45.camel@16bits.net> Subject: Re: bug#36960: mistake with v param From: =?ISO-8859-1?Q?=C1ngel?= To: 36820-done@debbugs.gnu.org Date: Sat, 17 Aug 2019 00:28:13 +0200 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 36820-done Cc: Daniele Grassini X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 2019-08-07 at 17:45 +0200, Daniele Grassini wrote: > so why the '-o' option check the regular exp, but the '-v' don't do his= =20 > job?? >=20 Hello Daniele As the manual states: > -v, --invert-match > Invert the sense of matching, to select non-matching lines. With -v you are matching the *lines* that don't contain "[a-z]{1}[0-9]+\.ko= $", not the *portion of the line* which doesn't match. For removing lines which end that way I would recommend you to simply repla= ce your grep with sed, ie. sed -E 's/[a-z]{1}[0-9]+\.ko$//' (add -n and p flag to ignore lines not ending that way) Best regards From unknown Fri Jun 13 10:08:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 14 Sep 2019 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