From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: Anton Samokat Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 15 Jan 2025 14:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 75582@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173695179114272 (code B ref -1); Wed, 15 Jan 2025 14:37:03 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jan 2025 14:36:31 +0000 Received: from localhost ([127.0.0.1]:57348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tY4VS-0003i3-Rt for submit@debbugs.gnu.org; Wed, 15 Jan 2025 09:36:31 -0500 Received: from lists.gnu.org ([2001:470:142::17]:41560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tY0zT-0006vG-E1 for submit@debbugs.gnu.org; Wed, 15 Jan 2025 05:51:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tY0zO-0000kS-2I for bug-grep@gnu.org; Wed, 15 Jan 2025 05:51:10 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tY0zL-0006QJ-VF for bug-grep@gnu.org; Wed, 15 Jan 2025 05:51:09 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5401e6efffcso6771268e87.3 for ; Wed, 15 Jan 2025 02:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736938264; x=1737543064; darn=gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=MGwjcf1HyXCJvvs2tRyBFqidQaDdpoGh5X3dOyrss+k=; b=bvuVGMXSaogBCMiVdxJKMVeulLA4bDDKMjY2sOvbERHAh9kPd7u0wBGqcoWQKpxpdS TCPwtg3TOmH8MUgcWp1EDNE1IU5w2pvEE5stDqHpqd0CWjRJkn7np0lXAAkmP4W2WwWl kVpmBL1h60ufAqM00ivKLaHLt8UrgW07jAy8EGzWKYv5rvXnneN/Gk1G0uL7Gb+cJVu4 81frgybayjPm6Vd8hOxqrfWSZOOPUiCdQHndHcor81SbpwUzJVRjXNFyEh9eI3ayD0QM Q1MXYSgx+XmX58SsJS4DJx0afa+WB+6084RHpDl771NEKoFbFdGW5wYJuxSbyZybkkwv 7YtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736938264; x=1737543064; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MGwjcf1HyXCJvvs2tRyBFqidQaDdpoGh5X3dOyrss+k=; b=kSLLeGUpc7+tIBBhsy3w5Ww37VPoRfUPStEG/EwThs//FYeiYHRzVFej+Qit/NWarY vWUscfh7FbEMm+y7hHOs3BYiXM+yfz3QykmLhEmfNwO2X9Q79A8B/Ou7AllbRRiExl9a EK3hM7kAE0LnZz0Iyn2HZdAXftaZM984KAMuzqAbgGA/Vnwu2cTxxJ9DgfffGyS6E28x xsdQio1lpqK/wjn7qH7qPicDwA3aLZpBxXenR5MtcMFw0zCEAnc02iOO3MSXaz14LB7l CLVwVAkGBkepCaU6u3Fp/WURE7PknJjSaulCwoEwu8BNHisVZ10G019Y/LoTwkmBFPhT JS1A== X-Gm-Message-State: AOJu0Yy94u1pchrC7RrNnU63uyuAUjlex/1aFBY813pxMzZps+k7YO4M Et8UStxJ6jLGhA/Iykkg51wm5+JNUk9zm6nAoA2r4W5y5ikdlsbGpLuh9w== X-Gm-Gg: ASbGnctRz5IR5Kub4S1xp9I86SXY/+55a+wzBCMwuhCSqIH64YF8fb6q8R4ralnyl5O E93b6zl3smzXLkDfW7BX8WEmEQzf7a+aFe3RNAls8TyJDYhEPMLfxj85zKUkD7jQu5YRrk35K4G dFZak8yBJe4DknED5ruF/gZ0Lx455BZyaUxtQQU5o7EoqAH2vElwEfqjx/GHkh8J1nDuqY/naiB LeCKrWkYNmeYlo7tG6MMrLSpR+UPvWyQMEdabJCkO+AKSAe6uCqui7Fh05a3+c= X-Google-Smtp-Source: AGHT+IFRQF6orfJLILnjaBKeDudWoNNmHOapsJGNvAh28slSolyLeA2znpkTBvBphFIII/iJ/5pjxg== X-Received: by 2002:a05:6512:68b:b0:53f:231e:6fa2 with SMTP id 2adb3069b0e04-542845d73e1mr8908636e87.26.1736938264031; Wed, 15 Jan 2025 02:51:04 -0800 (PST) Received: from [192.168.42.59] ([176.59.168.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5428be49de6sm1949088e87.2.2025.01.15.02.51.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2025 02:51:02 -0800 (PST) Content-Type: multipart/alternative; boundary="------------IxpyHZU0HKsQPW2FoNP5wmp8" Message-ID: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> Date: Wed, 15 Jan 2025 13:51:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Anton Samokat Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=samokat700@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello In *man grep* page, in the beginning, in the *description* section, there is phrase: /A FILE of =?UTF-8?Q?=E2=80=9C-=E2=80=9D?= stands for standard =?UTF-8?Q?input.=C2=A0?= If no FILE is given, recursive searches examine =?UTF-8?Q?the=C2=A0_?= =?UTF-8?Q?working=C2=A0?= directory, =?UTF-8?Q?and=C2=A0?= nonrecursive =?UTF-8?Q?=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0?= searches read standard input./ Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (samokat700[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (samokat700[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 HTML_MESSAGE BODY: HTML included in message X-Mailman-Approved-At: Wed, 15 Jan 2025 09:36:27 -0500 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: 0.2 (/) This is a multi-part message in MIME format. --------------IxpyHZU0HKsQPW2FoNP5wmp8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello In *man grep* page, in the beginning, in the *description* section, there is phrase: /A FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the  working  directory, and  nonrecursive        searches read standard input./ This is for GNU grep 3.4 in Ubuntu 20.04. At first read I thought that this phrase is non accurate, that it have mistakes. I read and understand it as follows: /    If no FILE is given, recursively examine the working directory, and nonrecursively read standard input./ /Which does not have sense./ /But t/his phrase is accurate and means the following: _If no FILE is given, recursive searches (grep with -r option), examine the working directory; nonrecursive searches (without -r option), read standard input._ Though it will be hard to get for non experienced user. Please, make it more simple and straightforward, remove possible ambiguity. You can use my version above or correct it as you prefer. As I understand this ambiguity created related discussion on Unix & Linux Stack Exchange: Why is "grep keyword" causing the terminal to stand by forever? — https://unix.stackexchange.com/a/789609/585416 Thanks, Anton. --------------IxpyHZU0HKsQPW2FoNP5wmp8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hello

In man grep page, in the beginning, in the description section, there is phrase:

       A FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the  working  directory,  and  nonrecursive
       searches read standard input.

This is for GNU grep 3.4 in Ubuntu 20.04. At first read I thought that this phrase is non accurate, that it have mistakes. I read and understand it as follows:

    If no FILE is given, recursively examine the working directory, and nonrecursively read standard input.

Which does not have sense.

But this phrase is accurate and means the following: If no FILE is given, recursive searches (grep with -r option), examine the working directory; nonrecursive searches (without -r option), read standard input.

Though it will be hard to get for non experienced user. Please, make it more simple and straightforward, remove possible ambiguity. You can use my version above or correct it as you prefer.

As I understand this ambiguity created related discussion on Unix & Linux Stack Exchange: Why is "grep keyword" causing the terminal to stand by forever? —  https://unix.stackexchange.com/a/789609/585416

Thanks, Anton.

--------------IxpyHZU0HKsQPW2FoNP5wmp8-- From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 15 Jan 2025 21:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Anton Samokat , 75582@debbugs.gnu.org Received: via spool by 75582-submit@debbugs.gnu.org id=B75582.17369769173908 (code B ref 75582); Wed, 15 Jan 2025 21:36:01 +0000 Received: (at 75582) by debbugs.gnu.org; 15 Jan 2025 21:35:17 +0000 Received: from localhost ([127.0.0.1]:59006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYB2j-00010y-FL for submit@debbugs.gnu.org; Wed, 15 Jan 2025 16:35:17 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:45860) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYB2g-0000z3-CA for 75582@debbugs.gnu.org; Wed, 15 Jan 2025 16:35:15 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 1B65A3C082C91; Wed, 15 Jan 2025 13:35:08 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id MfTO6Dq8M6iX; Wed, 15 Jan 2025 13:35:07 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id D62CF3C082C9F; Wed, 15 Jan 2025 13:35:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu D62CF3C082C9F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736976907; bh=40DZiFNCpRPmc3LKLX17qYU7tZI9ziqTsz/n/KGwuoA=; h=Message-ID:Date:MIME-Version:To:From; b=DUpU/z4qumTP4IvsWVEkwdYU7NjHCOAXXq9X4LT0qDSl5Z+agSZqka/+VLD6OcewW bxMkKC8Qbr0ADiteI61UPNM7fCBQVhTH/xipIibsdI2sXb0q0g5ztejnv39ioVtKD4 bGSFWDQ4eAuoUx9R+q0DqcY16A6Sg0GeGT17Iv8ED9mWbvqq77a7OEJNXsgj8c9qDY iIwq/j51JiYYR3hQexXlPmdLUILLejqlxa+bGAB6bbs0EKIBrkkBkjz8VF6GoArMVN LfY6aYS34zXcLDKkCV3CeGsTt53vB3RNrj3ZRQUQJzNR2GuOGMLW67K6b4AgBLYfv1 +vNF46TPWRfCw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 9dKXPgjaTv7r; Wed, 15 Jan 2025 13:35:07 -0800 (PST) Received: from [192.168.254.12] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id B2CFB3C082C91; Wed, 15 Jan 2025 13:35:07 -0800 (PST) Message-ID: <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> Date: Wed, 15 Jan 2025 13:35:07 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) 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 2025-01-15 02:51, Anton Samokat wrote: > Please, make it more simple and straightforward, remove possible ambiguity Unfortunately these are competing goals. Perhaps this would be better: If no FILE is given read standard input, but if -r is given recursively search the working directory instead. From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: sur-behoffski Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Thu, 16 Jan 2025 04:16:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 75582@debbugs.gnu.org Received: via spool by 75582-submit@debbugs.gnu.org id=B75582.173700091610616 (code B ref 75582); Thu, 16 Jan 2025 04:16:03 +0000 Received: (at 75582) by debbugs.gnu.org; 16 Jan 2025 04:15:16 +0000 Received: from localhost ([127.0.0.1]:59500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYHHl-0002i8-3M for submit@debbugs.gnu.org; Wed, 15 Jan 2025 23:15:16 -0500 Received: from m4.out4.mxs.au ([110.232.143.188]:13372) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYFzJ-0007HD-G3 for 75582@debbugs.gnu.org; Wed, 15 Jan 2025 21:52:09 -0500 Received: from fe.s2.ax.email (fe.s2.ax.email [110.232.143.210]) by out4.mxs.au (Halon) with ESMTPS (TLSv1.3) tls TLS_AES_256_GCM_SHA384 id d90b1750-d3b4-11ef-991d-00163c87da3f for <75582@debbugs.gnu.org>; Thu, 16 Jan 2025 13:51:56 +1100 (AEDT) Authentication-Results: fe.s2.ax.email; dkim=pass header.d=grouse.com.au header.b="QdJGQP7w" Received: from be3.s2.ax.email (10.40.10.213) by fe.s2.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 33FA02; Thu, 16 Jan 2025 13:51:56 +1100 DKIM-Signature: v=1; a=rsa-sha256; d=grouse.com.au; s=axigen; c=relaxed/relaxed; q=dns/txt; h=from:date:to:cc:message-id:subject; bh=EYZXiVx09h8nXpxK/ELSY3d5IaZNOJz1sSFtj1wO6h0=; b=QdJGQP7wZZTDbb9cedUlotEPH4rRYsA0gfEEEs+wZU653N6C5JoYxUe1UmH6eeWa6xVV4LkqWUNZU7b9N53RQ/MBEizuw6mIVTr4PYcX6j1xPeU1ST4mnI3q+UbzwdKgSQ0jPEwth9lqq8EdKGCd7ykWkD3yOzV1l416TGC+TXNnwbiBQbtyqAXpejPklBT+YEb8IhQV8nlWkV0cJ3s/pGlxh/yvZVKHK+xdujOn8yVcCyiTyX+W39S98skhAcDHvO8ZLp0Pu21mdpMYq+67aVTrMGj2U52oKsKk2x+OJqgBp7U7oldiFaHckr0Das6Xni1ItmbH+IkiaQKfNSXu0Q==; Authentication-Results: be3.s2.ax.email; dkim=none Authentication-Results: be3.s2.ax.email; spf=pass smtp.mailfrom=sur-behoffski@grouse.com.au Received: from fe.s2.ax.email (10.40.10.210) by be3.s2.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 2D415A; Thu, 16 Jan 2025 13:51:55 +1100 Authentication-Results: fe.s2.ax.email; dkim=none Received: from [IPV6:2001:44b8:28b:f300:ec4:7aff:fe68:fa16] (10.40.10.201) by fe.s2.ax.email (Axigen) with ESMTPA id 3F0036; Thu, 16 Jan 2025 13:51:55 +1100 Message-ID: Date: Thu, 16 Jan 2025 13:21:47 +1030 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> Content-Language: en-AU From: sur-behoffski In-Reply-To: <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit DomainKey-Status: no signature DKIM-Status: good Received-SPF: X-AXIGEN-DK-Result: No records X-AXIGEN-DKIM-Result: Ok X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Wed, 15 Jan 2025 23:15:03 -0500 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 2025-01-16 08:05, Paul Eggert wrote: > On 2025-01-15 02:51, Anton Samokat wrote: >> Please, make it more simple and straightforward, remove possible ambiguity > > Unfortunately these are competing goals. > > Perhaps this would be better: > > If no FILE is given read standard input, but if -r is given recursively > search the working directory instead. > [...] Interesting. How about: If no FILE is given, grep's behaviour depends on the -r (recursive) option, which is disabled (non-recursive) by default: - If non-recursive, then read standard input; otherwise - If recursive, examine all files in the working directory, including recursively descending into subdirectories. No idea if this is good, bad, or indifferent... others can decide. s-b etc. From unknown Tue Aug 19 21:02:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Anton Samokat Subject: bug#75582: closed (Re: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual) Message-ID: References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> X-Gnu-PR-Message: they-closed 75582 X-Gnu-PR-Package: grep Reply-To: 75582@debbugs.gnu.org Date: Thu, 16 Jan 2025 05:03:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1737003782-19437-1" This is a multi-part message in MIME format... ------------=_1737003782-19437-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #75582: GNU grep 3.4 =E2=80=94 enhancing manual which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 75582@debbugs.gnu.org. --=20 75582: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75582 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1737003782-19437-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 75582-done) by debbugs.gnu.org; 16 Jan 2025 05:02:57 +0000 Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYI1x-00053E-9l for submit@debbugs.gnu.org; Thu, 16 Jan 2025 00:02:57 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:61684) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tYI1s-00052s-Sl for 75582-done@debbugs.gnu.org; Thu, 16 Jan 2025 00:02:53 -0500 Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-2efe25558ddso745125a91.2 for <75582-done@debbugs.gnu.org>; Wed, 15 Jan 2025 21:02:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737003767; x=1737608567; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2anJaZFcsrYkfUFK8npQQPHluNpVLZ9VLnzPEZSK+oU=; b=YbxqABOWYx3NhkzhGfvtWx4YcgyVVYdFTAHjgT9LVVeA9cREXIIpZr1wN/BlkleHAQ DoUST3a9s0fhXZUUnHOPA5mmz+ha9q/0zSYECx3HYO0Kfh7drgEzec3e8aduw5aSLUao UJs4FzBTiUfFR/VcmEEHjTfRQDnN6hROqfU+2oclwgPV+tZFp9ATqShHXJTiCisowujP 3bW0jGlLnDGwoqoPXzYiIt6BeUqnwAym25nnduHDoWYhowA8Ywfoe1cpxX5RnWe77shr Vk7bfgqeSy1PXzh0KLO/+Ite42e2bhwVNcPRLL8Wv9GSCoi34y3kU7RN83wlEw6YJc2X XDig== X-Gm-Message-State: AOJu0Yy44Wana6fE5QX9wM2HaihklTSEvyjZOBGiomUmIMefeubT5nOC 24p+qIYccnuaPiBXHzYTACexwqdqYweZB0BRuPUyUTzzW54Ia86Fp8hqn9zKT8cZtakn41ne4E3 5C+mxbu/XfG7/mqhaQLJ+1CqLK9mm8jgE X-Gm-Gg: ASbGncsZ+MzfZuAJRbjrr15mbyRrlai9DtktFovKv14fTG0itRBM0rSVg9lKhSBimS7 vUGqlK5bE/Wq9Kn+7slUAtZAkv98lg5AitMQ= X-Google-Smtp-Source: AGHT+IEHxMMzUe3Hym9nUTXYWjFMwcgx6mokVK2VeZTUxEwgZNZAQLyrQ8O2j7V0VUdGmDalqLo27gBBggxgc+DfpGE= X-Received: by 2002:a17:90b:534b:b0:2ee:9d57:243 with SMTP id 98e67ed59e1d1-2f548e9a473mr41652156a91.1.1737003766611; Wed, 15 Jan 2025 21:02:46 -0800 (PST) MIME-Version: 1.0 References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> In-Reply-To: From: Jim Meyering Date: Wed, 15 Jan 2025 21:02:34 -0800 X-Gm-Features: AbW1kvZXvHvKrmm_Dadq9-3jcgdjQhGx4hGETquBE_c3hjDM9MTDqol4T5eP200 Message-ID: Subject: =?UTF-8?Q?Re=3A_bug=2375582=3A_GNU_grep_3=2E4_=E2=80=94_enhancing_manual?= To: sur-behoffski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 75582-done Cc: 75582-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: -0.7 (/) On Wed, Jan 15, 2025 at 8:16=E2=80=AFPM sur-behoffski wrote: > On 2025-01-16 08:05, Paul Eggert wrote: > > On 2025-01-15 02:51, Anton Samokat wrote: > >> Please, make it more simple and straightforward, remove possible ambig= uity > > > > Unfortunately these are competing goals. > > > > Perhaps this would be better: > > > > If no FILE is given read standard input, but if -r is given recursively > > search the working directory instead. > > [...] > > Interesting. How about: > > If no FILE is given, grep's behaviour depends on the -r (recursive) > option, which is disabled (non-recursive) by default: > > - If non-recursive, then read standard input; otherwise > - If recursive, examine all files in the working directory, > including recursively descending into subdirectories. > > No idea if this is good, bad, or indifferent... others can decide. Thanks for the suggestions. I went with Paul's (keeping it concise is important), so --help now prints this: When FILE is '-', read standard input. If no FILE is given, read standard input, but with -r, recursively search the working directory instead. With fewer than two FILEs, assume -h. Exit status is 0 if any line is selected, 1 otherwise; if any error occurs and -q is not given, the exit status is 2. Here's the commit: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=3Dv3.11-56-gfc6aba9 Marking this as done. ------------=_1737003782-19437-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Jan 2025 14:36:31 +0000 Received: from localhost ([127.0.0.1]:57348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tY4VS-0003i3-Rt for submit@debbugs.gnu.org; Wed, 15 Jan 2025 09:36:31 -0500 Received: from lists.gnu.org ([2001:470:142::17]:41560) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tY0zT-0006vG-E1 for submit@debbugs.gnu.org; Wed, 15 Jan 2025 05:51:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tY0zO-0000kS-2I for bug-grep@gnu.org; Wed, 15 Jan 2025 05:51:10 -0500 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tY0zL-0006QJ-VF for bug-grep@gnu.org; Wed, 15 Jan 2025 05:51:09 -0500 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5401e6efffcso6771268e87.3 for ; Wed, 15 Jan 2025 02:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736938264; x=1737543064; darn=gnu.org; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=MGwjcf1HyXCJvvs2tRyBFqidQaDdpoGh5X3dOyrss+k=; b=bvuVGMXSaogBCMiVdxJKMVeulLA4bDDKMjY2sOvbERHAh9kPd7u0wBGqcoWQKpxpdS TCPwtg3TOmH8MUgcWp1EDNE1IU5w2pvEE5stDqHpqd0CWjRJkn7np0lXAAkmP4W2WwWl kVpmBL1h60ufAqM00ivKLaHLt8UrgW07jAy8EGzWKYv5rvXnneN/Gk1G0uL7Gb+cJVu4 81frgybayjPm6Vd8hOxqrfWSZOOPUiCdQHndHcor81SbpwUzJVRjXNFyEh9eI3ayD0QM Q1MXYSgx+XmX58SsJS4DJx0afa+WB+6084RHpDl771NEKoFbFdGW5wYJuxSbyZybkkwv 7YtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736938264; x=1737543064; h=subject:from:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MGwjcf1HyXCJvvs2tRyBFqidQaDdpoGh5X3dOyrss+k=; b=kSLLeGUpc7+tIBBhsy3w5Ww37VPoRfUPStEG/EwThs//FYeiYHRzVFej+Qit/NWarY vWUscfh7FbEMm+y7hHOs3BYiXM+yfz3QykmLhEmfNwO2X9Q79A8B/Ou7AllbRRiExl9a EK3hM7kAE0LnZz0Iyn2HZdAXftaZM984KAMuzqAbgGA/Vnwu2cTxxJ9DgfffGyS6E28x xsdQio1lpqK/wjn7qH7qPicDwA3aLZpBxXenR5MtcMFw0zCEAnc02iOO3MSXaz14LB7l CLVwVAkGBkepCaU6u3Fp/WURE7PknJjSaulCwoEwu8BNHisVZ10G019Y/LoTwkmBFPhT JS1A== X-Gm-Message-State: AOJu0Yy94u1pchrC7RrNnU63uyuAUjlex/1aFBY813pxMzZps+k7YO4M Et8UStxJ6jLGhA/Iykkg51wm5+JNUk9zm6nAoA2r4W5y5ikdlsbGpLuh9w== X-Gm-Gg: ASbGnctRz5IR5Kub4S1xp9I86SXY/+55a+wzBCMwuhCSqIH64YF8fb6q8R4ralnyl5O E93b6zl3smzXLkDfW7BX8WEmEQzf7a+aFe3RNAls8TyJDYhEPMLfxj85zKUkD7jQu5YRrk35K4G dFZak8yBJe4DknED5ruF/gZ0Lx455BZyaUxtQQU5o7EoqAH2vElwEfqjx/GHkh8J1nDuqY/naiB LeCKrWkYNmeYlo7tG6MMrLSpR+UPvWyQMEdabJCkO+AKSAe6uCqui7Fh05a3+c= X-Google-Smtp-Source: AGHT+IFRQF6orfJLILnjaBKeDudWoNNmHOapsJGNvAh28slSolyLeA2znpkTBvBphFIII/iJ/5pjxg== X-Received: by 2002:a05:6512:68b:b0:53f:231e:6fa2 with SMTP id 2adb3069b0e04-542845d73e1mr8908636e87.26.1736938264031; Wed, 15 Jan 2025 02:51:04 -0800 (PST) Received: from [192.168.42.59] ([176.59.168.206]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5428be49de6sm1949088e87.2.2025.01.15.02.51.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2025 02:51:02 -0800 (PST) Content-Type: multipart/alternative; boundary="------------IxpyHZU0HKsQPW2FoNP5wmp8" Message-ID: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> Date: Wed, 15 Jan 2025 13:51:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-grep@gnu.org From: Anton Samokat Subject: =?UTF-8?Q?GNU_grep_3=2E4_=E2=80=94_enhancing_manual?= Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=samokat700@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello In *man grep* page, in the beginning, in the *description* section, there is phrase: /A FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the  working  directory, and  nonrecursive        searches read standard input./ Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (samokat700[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (samokat700[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 15 Jan 2025 09:36:27 -0500 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: 0.2 (/) This is a multi-part message in MIME format. --------------IxpyHZU0HKsQPW2FoNP5wmp8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello In *man grep* page, in the beginning, in the *description* section, there is phrase: /A FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the  working  directory, and  nonrecursive        searches read standard input./ This is for GNU grep 3.4 in Ubuntu 20.04. At first read I thought that this phrase is non accurate, that it have mistakes. I read and understand it as follows: /    If no FILE is given, recursively examine the working directory, and nonrecursively read standard input./ /Which does not have sense./ /But t/his phrase is accurate and means the following: _If no FILE is given, recursive searches (grep with -r option), examine the working directory; nonrecursive searches (without -r option), read standard input._ Though it will be hard to get for non experienced user. Please, make it more simple and straightforward, remove possible ambiguity. You can use my version above or correct it as you prefer. As I understand this ambiguity created related discussion on Unix & Linux Stack Exchange: Why is "grep keyword" causing the terminal to stand by forever? — https://unix.stackexchange.com/a/789609/585416 Thanks, Anton. --------------IxpyHZU0HKsQPW2FoNP5wmp8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hello

In man grep page, in the beginning, in the description section, there is phrase:

       A FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the  working  directory,  and  nonrecursive
       searches read standard input.

This is for GNU grep 3.4 in Ubuntu 20.04. At first read I thought that this phrase is non accurate, that it have mistakes. I read and understand it as follows:

    If no FILE is given, recursively examine the working directory, and nonrecursively read standard input.

Which does not have sense.

But this phrase is accurate and means the following: If no FILE is given, recursive searches (grep with -r option), examine the working directory; nonrecursive searches (without -r option), read standard input.

Though it will be hard to get for non experienced user. Please, make it more simple and straightforward, remove possible ambiguity. You can use my version above or correct it as you prefer.

As I understand this ambiguity created related discussion on Unix & Linux Stack Exchange: Why is "grep keyword" causing the terminal to stand by forever? —  https://unix.stackexchange.com/a/789609/585416

Thanks, Anton.

--------------IxpyHZU0HKsQPW2FoNP5wmp8-- ------------=_1737003782-19437-1-- From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: sur-behoffski Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 03:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Meyering Cc: 75582-done@debbugs.gnu.org Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173708453622883 (code D ref 75582); Fri, 17 Jan 2025 03:29:01 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 03:28:56 +0000 Received: from localhost ([127.0.0.1]:35494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYd2W-0005wz-10 for submit@debbugs.gnu.org; Thu, 16 Jan 2025 22:28:56 -0500 Received: from m4.out4.mxs.au ([110.232.143.188]:15467) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYd2Q-0005we-Q0 for 75582-done@debbugs.gnu.org; Thu, 16 Jan 2025 22:28:54 -0500 Received: from fe.s1.ax.email (fe.s1.ax.email [110.232.143.205]) by out4.mxs.au (Halon) with ESMTPS (TLSv1.3) tls TLS_AES_256_GCM_SHA384 id 24a1fc3c-d483-11ef-991d-00163c87da3f for <75582-done@debbugs.gnu.org>; Fri, 17 Jan 2025 14:28:39 +1100 (AEDT) Authentication-Results: fe.s1.ax.email; dkim=pass header.d=grouse.com.au header.b="NUC2UbYa" Received: from be3.s2.ax.email (10.40.10.213) by fe.s1.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 0D93CC; Fri, 17 Jan 2025 14:28:39 +1100 DKIM-Signature: v=1; a=rsa-sha256; d=grouse.com.au; s=axigen; c=relaxed/relaxed; q=dns/txt; h=from:date:to:cc:message-id:subject; bh=DaXg0qrhsTqRnu1qBJT/rlWpmCFHV4bGjN7gvezTbiQ=; b=NUC2UbYa3YKQFmIlRQ3yu7KNewPHPhz2+ufymtMljwZg8rtMC390IJ/JuMAcwp5FI8tRnaJvZYxH71epZ0tTxuaHURMy23AwU4s3XJZFNUnixObz5AQENwUsy7zN33DojDtuJEdp3lpYL8coV28IFAD3fHAl/kqhPX625OhM+VS8wChcV401lbSQqNFYXZH/7FgpLoZhwbIBYMOn9QHa6MXFqnLZYuad5c4RM5UrrijeZVw07mHeoLWtWzSPe7nd+RKpVv3SDw9xEDqjTHcKzT5Cgs0LuQykASInh4dy2tnYxamoMWqyWRcUXTolffFcvyZk/9HUKiuefqJgPsh51w==; Authentication-Results: be3.s2.ax.email; dkim=none Authentication-Results: be3.s2.ax.email; spf=pass smtp.mailfrom=sur-behoffski@grouse.com.au Received: from fe.s2.ax.email (10.40.10.210) by be3.s2.ax.email (Axigen) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA id 38F259; Fri, 17 Jan 2025 14:28:38 +1100 Authentication-Results: fe.s2.ax.email; dkim=none Received: from [IPV6:2001:44b8:28b:f300:ec4:7aff:fe68:fa16] (10.40.10.201) by fe.s2.ax.email (Axigen) with ESMTPA id 0FAAA3; Fri, 17 Jan 2025 14:28:38 +1100 Message-ID: <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> Date: Fri, 17 Jan 2025 13:58:30 +1030 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> Content-Language: en-AU From: sur-behoffski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DomainKey-Status: no signature DKIM-Status: good Received-SPF: X-AXIGEN-DK-Result: No records X-AXIGEN-DKIM-Result: Ok X-Spam-Score: 0.0 (/) 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 2025-01-16 15:32, Jim Meyering wrote: > On Wed, Jan 15, 2025 at 8:16 PM sur-behoffski > wrote: > [...]> > Thanks for the suggestions. I went with Paul's (keeping it concise is > important), so --help now prints this: > > When FILE is '-', read standard input. If no FILE is given, read standard > input, but with -r, recursively search the working directory instead. With > fewer than two FILEs, assume -h. Exit status is 0 if any line is selected, > 1 otherwise; if any error occurs and -q is not given, the exit status is 2. > > Here's the commit: > https://git.savannah.gnu.org/cgit/grep.git/commit/?id=v3.11-56-gfc6aba9 > > Marking this as done. ---------------------------- Blending in documentation about -h immediately made me curious. I've tried a quick test, and it seems grep 3.11's behaviour doesn't match the new documentation: ~ $ mkdir grep-r ~ $ cd !$ cd grep-r ~/grep-r $ echo "Hello, world" >single.txt ~/grep-r $ grep -r llo single.txt:Hello, world ~/grep-r $ ls -al total 12 drwxr-xr-x 2 bjh bjh 4096 Jan 17 13:30 . drwx--x--x 38 bjh bjh 4096 Jan 17 13:30 .. -rw-r--r-- 1 bjh bjh 13 Jan 17 13:30 single.txt ~/grep-r $ grep --version grep (GNU grep) 3.11 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and others; see . grep -P uses PCRE2 10.44 2024-06-07 ~/grep-r $ Note the match prefix "single.txt:" above. ---------------------------- Looking at grep's documentation for -h: -h, --no-filename Suppress the prefixing of file names on output. This is the default when there is only one file (or only standard input) to search. ---------------------------- The discrepancy arises because recursion might dig up only a single file to search, yet the assumption is that if -r is specified (use recursion), simply assume many files, i.e.: -H, --with-filename Print the file name for each match. This is the default when there is more than one file to search. This is a GNU extension. I believe the behaviour is reasonable, as grep doesn't want to get deeply into file counting associated with recursion, but the behaviour mismatches the new documentation. Reading the above a bit more, there may be confusion in the documentation between "one file" and "one FILE" in the -h entry. Also, an additional "-r implies -H" clause might be worthwhile in e.g. the -r documentation. ---------------------------- Hope this helps, s-b From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: jackson@fastmail.fm Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 04:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: sur-behoffski , "Jim Meyering" Cc: 75582-done@debbugs.gnu.org Received: via spool by 75582-done@debbugs.gnu.org id=D75582.17370895726625 (code D ref 75582); Fri, 17 Jan 2025 04:53:01 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 04:52:52 +0000 Received: from localhost ([127.0.0.1]:35651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYeLj-0001il-Up for submit@debbugs.gnu.org; Thu, 16 Jan 2025 23:52:52 -0500 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]:60579) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYeLg-0001iR-K2 for 75582-done@debbugs.gnu.org; Thu, 16 Jan 2025 23:52:49 -0500 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id C345013801BD; Thu, 16 Jan 2025 23:52:42 -0500 (EST) Received: from phl-imap-13 ([10.202.2.103]) by phl-compute-08.internal (MEProxy); Thu, 16 Jan 2025 23:52:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1737089562; x=1737175962; bh=FfXyN6ZayFBUwMlKb8WcvEc5VirmcMmjZGPGCbLSDDY=; b= Y83JvwXYqXNLtS8PbhLNK1mz/cYlAOIPrCUKam4tHuphveqg/DG97YKOAihVuzco nJhg/3+FixQnJSECNDPIlTVZ0cuJGnN64NRb2erhLjUmS5vQgshonmJig+3J2f+p OqytZky79TtqkJeiDwouVaG5HbQqQZWSnVjo2ghDHSd6sqRcqBqNJFFLTIhCapjJ //xqN44WWAUSE8rq0ZUUyUuWkFmkkX1BeOdQjriKAXntuohi9qoZUDR5KWf3Xy1x cN2K3r5j8A910pVuPEvbfp3k0IgCTfybiQim9OVf74w9EGHk9n3JPteM20yz7bnJ BRmAvjRqau74+ZPSq6YxzQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1737089562; x= 1737175962; bh=FfXyN6ZayFBUwMlKb8WcvEc5VirmcMmjZGPGCbLSDDY=; b=C 7mz6+LwbwmfhR45kQhvQrmDkNO4EV+GPEMSxfyM9m0dzsgS03utbeDCjKTY4QtWI z+Fe2AIYu+b2R55UNYO9EEoz/+RrrAS5o8UAi4Jb/2d5u0hBj84MlLu7cFwg4beA I65+w649Uqv8qyncAhrJ/+VK8cWs+FmLUuTOwT0X1IQVahH5iOkFUY442CVWGAvy YBtbjxHiPe/a90SUJO0C5E9Q3QF9bxtDjoBKrlyYesgdN5d+x96QSN84BchwgfRG 3ShqWB37YxtDGNNmQEWIlJHyS4WxAZ//rwpu2Zv42qJa8/TmGXuCykJV9mzqDzwN cfxVYWrTM5h75KkF33YNg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeivddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvvefkjghfufgtgfesthejredtredtjeenucfhrhhomhepjhgrtghkshhonhesfhgrshht mhgrihhlrdhfmhenucggtffrrghtthgvrhhnpedvjedvleekvdffieffhfehjeektefhje fhfeeujeehhfdtffdtgfefvdegveeitdenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehjrggtkhhsohhnsehfrghsthhmrghilhdrfhhmpdhnsg gprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejheehkedv qdguohhnvgesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehsuhhrqdgsvg hhohhffhhskhhisehgrhhouhhsvgdrtghomhdrrghupdhrtghpthhtohepjhhimhesmhgv higvrhhinhhgrdhnvght X-ME-Proxy: Feedback-ID: i21be4887:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 9B2201F00072; Thu, 16 Jan 2025 23:52:41 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Thu, 16 Jan 2025 22:51:19 -0600 From: jackson@fastmail.fm Message-Id: <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> In-Reply-To: <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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.7 (-) sur-behoffski wrote: >> Blending in documentation about -h immediately made me curious. Speaking off the cuff, without benefit of looking at the code or sufficient experimenting with the behavior, I would expect that: By default, if more than one file argument is named on the command line or is potentially implied by the "-r" recursive option, grep prefixes each line of output with the file name in which it was found, whereas if only one file is explicitly named, or only the standard input is being searched, then grep suppresses the prefixing of file names on output. The "-h" and "-H" options override these defaults, to either never ("-h") or always ("-H") prefix each line of output with the file name in which it was found. If "-H" is specified and grep is searching its standard input, that input file name prefix is the string "(standard input)". Clearly my previous paragraph fails the "keep word count parsimonious" mandate for man pages. Perhaps the two man page paragraphs, one for "-h" and the next one for "-H", could be combined into a single paragraph, derived from some parsimonious variant of my above paragraph, explaining both the "-h" and "-H" options. -- Paul Jackson jackson@fastmail.fm From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 06:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: jackson@fastmail.fm, sur-behoffski , Jim Meyering Cc: 75582-done@debbugs.gnu.org Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173709641128689 (code D ref 75582); Fri, 17 Jan 2025 06:47:02 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 06:46:51 +0000 Received: from localhost ([127.0.0.1]:35777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYg82-0007Sf-Ob for submit@debbugs.gnu.org; Fri, 17 Jan 2025 01:46:50 -0500 Received: from mail.cs.ucla.edu ([131.179.128.66]:45334) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYg80-0007SO-CJ for 75582-done@debbugs.gnu.org; Fri, 17 Jan 2025 01:46:49 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 0BCFA3C123843; Thu, 16 Jan 2025 22:46:42 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id bovs9NOziNVy; Thu, 16 Jan 2025 22:46:41 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BBCE03C123848; Thu, 16 Jan 2025 22:46:41 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu BBCE03C123848 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1737096401; bh=MbLyrBCZD1KaQqRoBVnqigCK0Asvc/Ru5ZP6hF7/rtA=; h=Message-ID:Date:MIME-Version:To:From; b=eQZ3b7WL2Fwko56WsYHax1/h5pIoHoGxFFpoUVKeLjcdllC/nwv6G9UWs1oc2tLJC A0a6AmKgsRZzMKLIKFK3fg1vFpaIGe5SGXV1vtbs61PIEWcRhB1FYaHKXV9bjcH36J V0l3tsiyhgEL8qa3Cz95BSW7AfYDg59IlZWFtJJ3N9EQHdvztJvrX8LUpFIy/Ym9pV O9bHlsfAmFP12orVFV2fNP8YY+ycBUCOF5ZPnMWIjnqYCQhTmGWdyxlAMMvR3YJ23W c+62+CYwWWTk+qht0c/X4eSTA1X4dSOlmUhwQuGIgL5WUEB9PnJjOq0D5AHDhmHGCL hKIWRldcyv7sw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id ZkkgdKkyv1Az; Thu, 16 Jan 2025 22:46:41 -0800 (PST) Received: from [192.168.254.12] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 9CF5E3C123843; Thu, 16 Jan 2025 22:46:41 -0800 (PST) Message-ID: <02fc6290-585b-41cc-bd34-aa63d4d9990c@cs.ucla.edu> Date: Thu, 16 Jan 2025 22:46:41 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) 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 2025-01-16 20:51, jackson@fastmail.fm wrote: > Clearly my previous paragraph fails the "keep word count parsimonious" mandate for man pages. Yup. From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: jackson@fastmail.fm Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 07:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: "Paul Eggert" , sur-behoffski , "Jim Meyering" Cc: 75582-done@debbugs.gnu.org Received: via spool by 75582-done@debbugs.gnu.org id=D75582.17371005189115 (code D ref 75582); Fri, 17 Jan 2025 07:56:01 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 07:55:18 +0000 Received: from localhost ([127.0.0.1]:35864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYhCH-0002Mw-Qj for submit@debbugs.gnu.org; Fri, 17 Jan 2025 02:55:18 -0500 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]:43193) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tYhCE-0002LE-1E for 75582-done@debbugs.gnu.org; Fri, 17 Jan 2025 02:55:15 -0500 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id E4324254020E; Fri, 17 Jan 2025 02:55:07 -0500 (EST) Received: from phl-imap-13 ([10.202.2.103]) by phl-compute-08.internal (MEProxy); Fri, 17 Jan 2025 02:55:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1737100507; x=1737186907; bh=k2hVcVp9DgpXGIPXpbz5LbLjPv4ajZM+8Jhj5IfFoLY=; b= VkKw49M8N5Q0mJhS6GtHtQXSjXGBJVsgabC7dfLAqJ+NQV83Mwh3g5+Dl5UxMH9o wMFZK9KXC8q7Q0GPFq/lGXelhzKfmxqjPmAMSA6Pj0gMIh95gSv8tOiUBHvLpeCN 3tOVatuA3zYM2rEYEVxbr8YqgswUgbt1k0XOm6rCB1RfRAUaM/O0ms59srE298S3 JLXWgTcqXc+jq2O0C3gCeGtJ649Z0rHqTNIuvBGsYnb8tj4kjiKUcX4KCES8u2Ic oLemsxifxiJUefewlNKYps7S78WL0PxZA10LBvGsm1RoNTAgb8XMmuv3BXIu8Bke +JPIMgmzOF+Eav37KzMpkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1737100507; x= 1737186907; bh=k2hVcVp9DgpXGIPXpbz5LbLjPv4ajZM+8Jhj5IfFoLY=; b=D T6UTRc2vUnrR4ZZ7NhP/o0iBqUu9ELTPOLXQxVh+KKHqsryg3IFFiHe/vcWIWEZs 3M2tc2Jj/quN4kxUqPRjTdwKGgqN7cEMC9P3tEOcpBoxrJi/lIjGiBSP6i8jWq/x FIpi8GBgQTgoUdHU12xORHm0InLhf2aBeGzE9FHJ74dKYOFapPk1PLi4+64l/9Yn WWNqxcPi/uEYaexaFJuHHfHGT7jZIb1t5ALM8oyqzRcz46fD3uhsYbes6Xe/+odi sciCfkqDhLxwnVKaWkaWDF1RaFuKBioYeQ5dACC7yI1RbgOpotOjSWywnWQzhRrB 73bZnmMChiygcHHI7LKBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeivddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefoggffhffvvefkjghfufgtgfesthejredtredt jeenucfhrhhomhepjhgrtghkshhonhesfhgrshhtmhgrihhlrdhfmhenucggtffrrghtth gvrhhnpedvjedvleekvdffieffhfehjeektefhjefhfeeujeehhfdtffdtgfefvdegveei tdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjrg gtkhhsohhnsehfrghsthhmrghilhdrfhhmpdhnsggprhgtphhtthhopeegpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegvghhgvghrthestghsrdhutghlrgdrvgguuhdprh gtphhtthhopeejheehkedvqdguohhnvgesuggvsggsuhhgshdrghhnuhdrohhrghdprhgt phhtthhopehsuhhrqdgsvghhohhffhhskhhisehgrhhouhhsvgdrtghomhdrrghupdhrtg hpthhtohepjhhimhesmhgvhigvrhhinhhgrdhnvght X-ME-Proxy: Feedback-ID: i21be4887:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 1CE5D1F00072; Fri, 17 Jan 2025 02:55:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Fri, 17 Jan 2025 01:53:51 -0600 From: jackson@fastmail.fm Message-Id: <8733b579-8fb5-46a2-9fdc-e91b20d722a6@app.fastmail.com> In-Reply-To: <02fc6290-585b-41cc-bd34-aa63d4d9990c@cs.ucla.edu> References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> <02fc6290-585b-41cc-bd34-aa63d4d9990c@cs.ucla.edu> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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.7 (-) Paul Eggert wrote: >> yup However, perhaps my "little" essay answers some of sur-behoffski's considerations. -- Paul Jackson jackson@fastmail.fm From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: "David G. Pickett" Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: sur-behoffski , Jim Meyering Cc: "75582-done@debbugs.gnu.org" <75582-done@debbugs.gnu.org> Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173713865627998 (code D ref 75582); Fri, 17 Jan 2025 18:31:01 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 18:30:56 +0000 Received: from localhost ([127.0.0.1]:38750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYr7Q-0007HW-20 for submit@debbugs.gnu.org; Fri, 17 Jan 2025 13:30:56 -0500 Received: from sonic315-54.consmr.mail.gq1.yahoo.com ([98.137.65.30]:41627) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tYr7K-0007HD-TO for 75582-done@debbugs.gnu.org; Fri, 17 Jan 2025 13:30:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1737138643; bh=hQCwJn4ygLCiTDuNkapB2IJdVbtXZPG68ur0NVFGLMQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=KtGphdG1gnzzLnF3AJ9E0YA8GJX+OsWIAxgXtPfV5ULYwQr62sjQSIHhxsnlFGLnXZib3LeYH+GTjon5lSpcEKBKYEleHQmfrAMl9okD8wgC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tI9d3KjW.SJxvEDJNGrU.cxPbrxV7 Hy7ZHeLOfNPNJcgC8sDiZjajpvS4U6ydUnV0w6ypODM2LZJNu55.zwt8C0_VZPfrtYiNoAq4K8uH X8LSLxnSxz5GSIZp21v9npnrJJAm6ST4k98znoNCc608GQ9iMS02vNC9U_vtL1vDr_10JI09mNAi bBjAeDnrxEN1bWTZJOlF9oQw73YbXnJoyinW0KxJ97CkNIos_sEquyrQwJ2tnRuu7yIxcfG_hqvT HKo_LWYkoip0mtRmEBeWGki8P6osMmSlHIcasb1QsIC4hqy_oLgeDaYvzGYaBbeJCgJiHb5bE51d .FTm.mrvDKjbhvvD8Qwjki2QL_AXD0ztNDkVEw9aeTTzTwvxQ2KXvkP_EfjbfaT9W1tmRnP4hx_b RWLl7P5HhXh1JbdEWEq1N6hYr0Tv3UZMvxepO4_sXtFT4sdX5olbUcoqk10NMrWtX8492PaKEsdS SL9H8rDyfw5BVJmEeeEuOHhe.szAz6mUSaKh3AWmfmquo5tszVQ92oVGcgUJyl1K8poteBbAy3JY MJV65Qk0QTgxY9b3Zw_UAKKKwQSJsw1l4w3_kgUp5tYLvagEVRxotVa.XHGi72m_nFEtk_VwOkUM D1_dG9NOntJcQ7hoVewmJceWq49vMe9Gc7sLlsDm18E0Q6DeZAtO4tiIRGIkf8ACLnqmPFC_RnD9 WZ_o4nC7nKeQs.fOGOhYQ2wQlU9JncAua X-Sonic-MF: X-Sonic-ID: 097522dd-da91-44f7-8285-80560cf064b2 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Fri, 17 Jan 2025 18:30:43 +0000 Date: Fri, 17 Jan 2025 18:30:41 +0000 (UTC) From: "David G. Pickett" Message-ID: <1718896501.1115366.1737138641622@mail.yahoo.com> In-Reply-To: References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1115365_365444172.1737138641620" X-Mailer: WebService/1.1.23187 AolMailNorrin Content-Length: 7200 X-Spam-Score: -1.8 (-) 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.8 (--) ------=_Part_1115365_365444172.1737138641620 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable With is rather like if ... else .... so maybe: When FILE is '-', read standard input.=C2=A0 If no FILE is given, with -r, = recursively search the working directory instead, else=C2=A0read standard= =C2=A0input.=C2=A0 With=C2=A0fewer than two FILEs, assume -h.=C2=A0 Exit st= atus is 0 if any line is selected,=C2=A01 otherwise; if any error occurs an= d -q is not given, the exit status is 2. =20 On Thursday, January 16, 2025 at 12:03:41 AM EST, Jim Meyering wrote: =20 On Wed, Jan 15, 2025 at 8:16=E2=80=AFPM sur-behoffski wrote: > On 2025-01-16 08:05, Paul Eggert wrote: > > On 2025-01-15 02:51, Anton Samokat wrote: > >> Please, make it more simple and straightforward, remove possible ambig= uity > > > > Unfortunately these are competing goals. > > > > Perhaps this would be better: > > > > If no FILE is given read standard input, but if -r is given recursively > > search the working directory instead. > > [...] > > Interesting.=C2=A0 How about: > >=C2=A0 =C2=A0 If no FILE is given, grep's behaviour depends on the -r (rec= ursive) >=C2=A0 =C2=A0 option, which is disabled (non-recursive) by default: > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 - If non-recursive, then read standard input; = otherwise >=C2=A0 =C2=A0 =C2=A0 =C2=A0 - If recursive, examine all files in the worki= ng directory, >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 including recursively descending into s= ubdirectories. > > No idea if this is good, bad, or indifferent... others can decide. Thanks for the suggestions. I went with Paul's (keeping it concise is important), so --help now prints this: When FILE is '-', read standard input.=C2=A0 If no FILE is given, read stan= dard input, but with -r, recursively search the working directory instead.=C2=A0= With fewer than two FILEs, assume -h.=C2=A0 Exit status is 0 if any line is sele= cted, 1 otherwise; if any error occurs and -q is not given, the exit status is 2. Here's the commit: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=3Dv3.11-56-gfc6aba9 Marking this as done. =20 ------=_Part_1115365_365444172.1737138641620 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
With is rather like if ... else .... so = maybe:

When FILE is '-', read standard input.  If n= o FILE is given, with -r, recursively search the working directory instead, else read standard input.  With fewer than two FILEs,= assume -h.  Exit status is 0 if any line is selected, 1 otherwis= e; if any error occurs and -q is not given, the exit status is 2.



=20
=20
On Thursday, January 16, 2025 at 12:03:41 AM EST, J= im Meyering <jim@meyering.net> wrote:


On Wed, Jan 15, 2025 at 8:16=E2=80=AF= PM sur-behoffski

<sur-behoffski@grouse= .com.au> wrote:
> On 2025-01-16 08:05, Paul Egg= ert wrote:
> > On 2025-01-15 02:51, Anton Samokat w= rote:
> >> Please, make it more simple and strai= ghtforward, remove possible ambiguity
> >
> > Unfortunately these are competing goals.
> >
> > Perhaps this would be better:
> >
> > If no FILE is given re= ad standard input, but if -r is given recursively
> &g= t; search the working directory instead.
> > [...]<= br clear=3D"none">>
> Interesting.  How about:=
>
>    If no FILE is = given, grep's behaviour depends on the -r (recursive)
>= ;    option, which is disabled (non-recursive) by default:
>
>        - If n= on-recursive, then read standard input; otherwise
>&nb= sp;       - If recursive, examine all files in the working = directory,
>          includ= ing recursively descending into subdirectories.
>
> No idea if this is good, bad, or indifferent... others c= an decide.


Thanks for the sugges= tions. I went with Paul's (keeping it concise is
importan= t), so --help now prints this:

When FI= LE is '-', read standard input.  If no FILE is given, read standardinput, but with -r, recursively search the working director= y instead.  With
fewer than two FILEs, assume -h.&nb= sp; Exit status is 0 if any line is selected,
1 otherwise= ; if any error occurs and -q is not given, the exit status is 2.

Here's the commit:
https= ://git.savannah.gnu.org/cgit/grep.git/commit/?id=3Dv3.11-56-gfc6aba9
Marking this as done.




------=_Part_1115365_365444172.1737138641620-- From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: "David G. Pickett" Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Fri, 17 Jan 2025 18:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: sur-behoffski , Jim Meyering , "jackson@fastmail.fm" Cc: "75582-done@debbugs.gnu.org" <75582-done@debbugs.gnu.org> Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173713894828940 (code D ref 75582); Fri, 17 Jan 2025 18:36:01 +0000 Received: (at 75582-done) by debbugs.gnu.org; 17 Jan 2025 18:35:48 +0000 Received: from localhost ([127.0.0.1]:38763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tYrC4-0007Wf-Eu for submit@debbugs.gnu.org; Fri, 17 Jan 2025 13:35:47 -0500 Received: from sonic301-22.consmr.mail.gq1.yahoo.com ([98.137.64.148]:41541) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tYrC1-0007WL-9l for 75582-done@debbugs.gnu.org; Fri, 17 Jan 2025 13:35:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1737138932; bh=0VyV3LNv1nZLhygjFF66ZUgO4Ck2eUs3st5BYgfKJ9M=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=maDx/QYRKWGrQnmw+6b6zUvaSnbBt4ieIIF1dD8sxGMZuabjNjqc4f/stInwfHd0i52+5ROOqBXB4jeNKMgufsVXUXFKVMCl3urSuvKDXhNh2g9hphtgy8JZRUhAZm5sX/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PKe2ooEU 2leNBGQ0qWNQ7LQnQmh7lPVFxmEa2BhyTWaezOpvPSl2EQD1Ugy_M0ODXcf93VhbrJXFlcDzDqxf V0h9N5WgjTdHs5wopchqoyCb8EqfB2u4jRKNWzWToAceWDkOxigl76rkPiT_KMp.wyalV6AGOhBY thyU2t00T_YqLGqee.vWIptRd.tjJxbUz3uq3EehDBGXvxY.JMXIFBSC3YHO0NXBbdtghcIsGqC. R3thjRE2.aeoWzlERAFWRYHFtyFRzX8ANMae.YdwkbCJ._U4PfiZbip.xOEMIBtNCTYjXy4zykPY ntsepAzNm3hWMxF2EjBt.NPZ09iaTGJdDy4o5EowN1YVVQBp8c_y8pO2s15E7Tn2WR47TVpfmmo6 lvuqZkWQPZlFsIl58LVKO4DKPSfbgUOCi0PUls4uAdx6JO3ALmy.aaqLJ3TI.FCESEQRrSbvextZ DpAr.JAK.yW_8vexE.lqSIfZ8HnjbYWI4JlEdZfKOvzTdpw_uAwx6DaUUPyya_1L1s1EG2k.cYTR G6WT4MLmkmZ7BZ9xmRLN3c5.najVGj1r.MKbr.D2K50iz2InupC7kamvpY922V_0FSJr1S2x6GW5 m6WOs_yNKNIQ.LmZubK1AsGS2bmk1jhFDXLZDPXUEqgD8BEvs6YHek_99y8Qb4D.Qvwz5G0.KPcS d72MgBjSn3GUh4daLbzDVNIv57qO1966CtUnzcg-- X-Sonic-MF: X-Sonic-ID: 698d3f1b-0249-4eb4-9584-03c7a2881e9c Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Fri, 17 Jan 2025 18:35:32 +0000 Date: Fri, 17 Jan 2025 18:35:31 +0000 (UTC) From: "David G. Pickett" Message-ID: <669808055.1122911.1737138931040@mail.yahoo.com> In-Reply-To: <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1122910_1553142064.1737138931039" X-Mailer: WebService/1.1.23187 AolMailNorrin Content-Length: 5161 X-Spam-Score: -0.8 (/) 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.8 (--) ------=_Part_1122910_1553142064.1737138931039 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Should both -r and file names raise an error? $ grep -r xxx yyy zzzgrep: yyy: No such file or directorygrep: zzz: No such= file or directory$ On Thursday, January 16, 2025 at 11:53:29 PM EST, jackson@fastmail.fm <= jackson@fastmail.fm> wrote: =20 sur-behoffski wrote: >> Blending in documentation about -h immediately made me curious. Speaking off the cuff, without benefit of looking at the code or sufficient= experimenting with the behavior, I would expect that: By default, if more than one file argument is named on the command line or = is potentially implied by the "-r" recursive option, grep prefixes each lin= e of output with the file name in which it was found, whereas if only one f= ile is explicitly named, or only the standard input is being searched, then= grep suppresses the prefixing of file names on output.=C2=A0 The "-h" and = "-H" options override these defaults, to either never ("-h") or always ("-H= ") prefix each line of output with the file name in which it was found.=C2= =A0 If "-H" is specified and grep is searching its standard input, that inp= ut file name prefix is the string "(standard input)". Clearly my previous paragraph fails the "keep word count parsimonious" mand= ate for man pages.=C2=A0 Perhaps the two man page paragraphs, one for "-h" = and the next one for "-H", could be combined into a single paragraph, deriv= ed from some parsimonious variant of my above paragraph, explaining both th= e "-h" and "-H" options. --=20 Paul Jackson jackson@fastmail.fm =20 ------=_Part_1122910_1553142064.1737138931039 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Should both -r and file name= s raise an error?

$ grep -r xxx yyy zzz
grep: yyy: No such file or director= y
grep: zzz: No such file or directory
$

=20
=20
On Thursday, January 16, 2025 at 11:53:29 PM EST, j= ackson@fastmail.fm <jackson@fastmail.fm> wrote:


sur-behoffski wrote:

>= > Blending in documentation about -h immediately made me curious.
<= br clear=3D"none">
Speaking off the cuff, without benefit= of looking at the code or sufficient experimenting with the behavior, I wo= uld expect that:

By default, if more t= han one file argument is named on the command line or is potentially implie= d by the "-r" recursive option, grep prefixes each line of output with the = file name in which it was found, whereas if only one file is explicitly nam= ed, or only the standard input is being searched, then grep suppresses the = prefixing of file names on output.  The "-h" and "-H" options override= these defaults, to either never ("-h") or always ("-H") prefix each line o= f output with the file name in which it was found.  If "-H" is specifi= ed and grep is searching its standard input, that input file name prefix is= the string "(standard input)".

Clearl= y my previous paragraph fails the "keep word count parsimonious" mandate fo= r man pages.  Perhaps the two man page paragraphs, one for "-h" and th= e next one for "-H", could be combined into a single paragraph, derived fro= m some parsimonious variant of my above paragraph, explaining both the "-h"= and "-H" options.

--
Paul Jackson
jackson@fastmail.fm



------=_Part_1122910_1553142064.1737138931039-- From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 18 Jan 2025 05:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: "David G. Pickett" Cc: "75582-done@debbugs.gnu.org" <75582-done@debbugs.gnu.org>, sur-behoffski , "jackson@fastmail.fm" Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173717820925303 (code D ref 75582); Sat, 18 Jan 2025 05:31:02 +0000 Received: (at 75582-done) by debbugs.gnu.org; 18 Jan 2025 05:30:09 +0000 Received: from localhost ([127.0.0.1]:39665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZ1PM-0006a1-N0 for submit@debbugs.gnu.org; Sat, 18 Jan 2025 00:30:09 -0500 Received: from mail-pj1-f52.google.com ([209.85.216.52]:43076) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tZ1PJ-0006Yx-M0 for 75582-done@debbugs.gnu.org; Sat, 18 Jan 2025 00:30:06 -0500 Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2ee50ffcf14so6363002a91.0 for <75582-done@debbugs.gnu.org>; Fri, 17 Jan 2025 21:30:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737178199; x=1737782999; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/kcynMTJV38Sl/tbnzEVNvpKDkR24RGyfB9is76IjcA=; b=eRk0m6WZowv8QudOq6pJ+ivOVgvK/a56uCqGRAOd74RX+cBYNNl6KxTeoowQEzyLkC ruViW83yUMmQNAiOff64giEERr1+5kl4QJcpnrKhv0YB47XHjc3SZ/ttqDi9CfldDiHc c7Z5Ud9agfEL8/CowJvH6hCYuZavbnPq3IeYnKeYoxwAhPNW/Xc9hWpni6Z5LRiyY8e1 seop5Mh1LMUOnyftFGma868qRfnTZMgvy9K4IK3DAC4kFS+7vJZYTZvXAET0oynE6flF oMSxTKu2NJyZ/+XgEwMv9HwijO7SCwHofl0L8EF8UT6arhJhPNbz61iX5qFNdaVPAVW4 kAcQ== X-Forwarded-Encrypted: i=1; AJvYcCVuz24yJIVNQ2gMHYD53ezL7iqWEQJtef7+wSOONhwjgWuVfbYM2u15eVF+NcxeUhmbO/hRfv2fUA6L@debbugs.gnu.org X-Gm-Message-State: AOJu0YzECvOyswnZm/rzj2jW2/nuymE1yFb6gXppS5cYgIt8A8nhXhK/ nYVrw+tI8i3VCNmY6fJjSlUJOPRTC8x2aXOdyRgqvDYZUp/7mJ0mu5dEmjUQvVk8itwaXu7C5ve mmdO0uqCnVwkvdqByx4EJuBALdes= X-Gm-Gg: ASbGncu7BVzqQk6PABAwfDnb3w07Bg4b7pHZz7WTXEf2HCPUfaNWUF9vtVqjPq0MErd NZCplkwdWB5z3FrQSZ/iqz8gXXLr1UDWfXiYsgZVrJdM1i7jv25N9F1IKZmcI7vL8qgxOBVL4yZ YJ1zE= X-Google-Smtp-Source: AGHT+IGtlQGHuf9YJkgAwt9UTVw4qLxNH3KlTMgwT7SUmHq3k0mQhjVz6sKkDEML66w2/NBco3naHdEneY4G5fycLfM= X-Received: by 2002:a17:90b:2e4a:b0:2ee:7504:bb3d with SMTP id 98e67ed59e1d1-2f782a8e9a6mr8584495a91.0.1737178199416; Fri, 17 Jan 2025 21:29:59 -0800 (PST) MIME-Version: 1.0 References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> <669808055.1122911.1737138931040@mail.yahoo.com> In-Reply-To: <669808055.1122911.1737138931040@mail.yahoo.com> From: Jim Meyering Date: Fri, 17 Jan 2025 21:29:45 -0800 X-Gm-Features: AbW1kvbRYAr8jsOuNJaPRIl-K64YShMH6VdQvDHsYMzuEYl5ThNN5eZXjEXhRw0 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) 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: -0.7 (/) On Fri, Jan 17, 2025 at 10:35=E2=80=AFAM David G. Pickett wrote: > Should both -r and file names raise an error? > > $ grep -r xxx yyy zzz > grep: yyy: No such file or directory > grep: zzz: No such file or directory That is expected behavior. In that case, you've made a legitimate request to search recursively for "xxx" in yyy and zzz. It would probably elicit no diagnostic if you had files or directories named yyy and zzz. From unknown Tue Aug 19 21:02:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#75582: GNU grep 3.4 =?UTF-8?Q?=E2=80=94?= enhancing manual Resent-From: "David G. Pickett" Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sat, 18 Jan 2025 17:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75582 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Meyering Cc: "75582-done@debbugs.gnu.org" <75582-done@debbugs.gnu.org>, sur-behoffski , "jackson@fastmail.fm" Received: via spool by 75582-done@debbugs.gnu.org id=D75582.173722172512960 (code D ref 75582); Sat, 18 Jan 2025 17:36:02 +0000 Received: (at 75582-done) by debbugs.gnu.org; 18 Jan 2025 17:35:25 +0000 Received: from localhost ([127.0.0.1]:43626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tZCjF-0003Mx-2Z for submit@debbugs.gnu.org; Sat, 18 Jan 2025 12:35:25 -0500 Received: from sonic314-19.consmr.mail.gq1.yahoo.com ([98.137.69.82]:46588) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tZCjC-0003Mh-QT for 75582-done@debbugs.gnu.org; Sat, 18 Jan 2025 12:35:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1737221715; bh=aom0xM4T+YIPcy1gMTL6peAqwWb3bVn4/Oqal0tcT1k=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=EsOD5mJJ98ysXC70Uyrit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ahoo.com with HTTP; Sat, 18 Jan 2025 17:35:15 +0000 Date: Sat, 18 Jan 2025 17:35:10 +0000 (UTC) From: "David G. Pickett" Message-ID: <1837454873.1362910.1737221710569@mail.yahoo.com> In-Reply-To: References: <2c3b242a-779d-47db-bd47-988ab324b624@gmail.com> <6df1dae4-0981-4669-8c0d-17ff02f5241f@cs.ucla.edu> <7600b34f-b8c9-4bfa-89f9-e45667340983@grouse.com.au> <369c0925-73ac-41ae-93d9-0baddbc22e6d@app.fastmail.com> <669808055.1122911.1737138931040@mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1362909_803437464.1737221710568" X-Mailer: WebService/1.1.23187 AolMailNorrin Content-Length: 3095 X-Spam-Score: -1.8 (-) 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.8 (--) ------=_Part_1362909_803437464.1737221710568 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable No -r activity? On Saturday, January 18, 2025 at 12:30:01 AM EST, Jim Meyering wrote: =20 On Fri, Jan 17, 2025 at 10:35=E2=80=AFAM David G. Pickett wrote: > Should both -r and file names raise an error? > > $ grep -r xxx yyy zzz > grep: yyy: No such file or directory > grep: zzz: No such file or directory That is expected behavior. In that case, you've made a legitimate request to search recursively for "xxx" in yyy and zzz. It would probably elicit no diagnostic if you had files or directories named yyy and zzz. =20 ------=_Part_1362909_803437464.1737221710568 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
No -r activity?
=20
=20
On Saturday, January 18, 2025 at 12:30:01 AM EST, J= im Meyering <jim@meyering.net> wrote:


On Fri, Jan 17, 2025 at 10:35=E2=80= =AFAM David G. Pickett <dgpickett@aol.com> wrote:
> Should both -r and file names raise an error?
>
> $ grep -r xxx yyy zzz
>= ; grep: yyy: No such file or directory
> grep: zzz: No= such file or directory


That is = expected behavior.
In that case, you've made a legitimate= request to search recursively
for "xxx" in yyy and zzz.<= br clear=3D"none">It would probably elicit no diagnostic if you had files o= r directories
named yyy and zzz.

=
------=_Part_1362909_803437464.1737221710568--