From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: from tb-ob21.topicbox.com (tb-ob21.topicbox.com [173.228.157.67]) by inbox.vuxu.org (Postfix) with ESMTP id 0097B29BA8 for ; Sat, 10 Aug 2024 22:47:09 +0200 (CEST) Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob21.topicbox.com (Postfix) with ESMTP id 8625232037 for ; Sat, 10 Aug 2024 16:47:07 -0400 (EDT) (envelope-from bounce.mM80e746fe9ffc98e7d9511774.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 3DEEC1F71933; Sat, 10 Aug 2024 16:47:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=from:to :message-id:date:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:subject:list-unsubscribe; s=dkim-1; t= 1723322827; x=1723409227; bh=4Q3kOyGpyYXDitp3OvDATYmYDB4QUFdISld pawhSRt4=; b=eyjZqczMMs7uvl6Dw/WuO7QALmVIIxGDmhzRVP5y7H0/cRW1wWi knfT88pWpMaEoyYL3lmMWwEj63XGolnTWrQb9+CPrGpTrqQXIgxBt31ekGxaKfBr /Irblngjt2LK9OOKcfUe6LWwSunJW85PW5bweKO1FJ8xgs3IoWg7eVzk= From: kalterdev@gmail.com To: 9fans <9fans@9fans.net> Message-Id: <17233228160.1d47.67930@composer.9fans.topicbox.com> Date: Sat, 10 Aug 2024 16:46:56 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=17233228161.89Fd3.67930 Content-Transfer-Encoding: 7bit Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: af92bdc2-5759-11ef-8290-b81740decc0b Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMTExNDlmMWY5NDk1OTNmNS1NODBlNzQ2ZmU5ZmZjOThlN2Q5NTEx?= =?UTF-8?B?Nzc0Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] How do you deal with newlines (line feed, LF, \n) in filenames? List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M80e746fe9ffc98e7d9511774:1:ulkTi8QU06fFbQyQHQRq4FMeOC8PnGY8lJgfiO1U2EU --17233228161.89Fd3.67930 Date: Sat, 10 Aug 2024 16:46:56 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Suppose you want to grep over a filtered list of files. Is there an idiomat= ic approach to solve this problem with rc? I can only think of one erroneous method: grep pattern `{find . -type f -name '*_test.go'} I know that it's possible to use find(1)'s -exec option. But find does not = exist in Plan 9. It seems like it is impossible to solve this problem with simple IO pipes. = One must encode newlines somehow, be it C-style \n, shell-style 'string', J= SON or whatnot. It also seems that newlines are the only symbol that breaks the idiom `grep= pattern `{cmd}`. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T11149f1f949593f5-M80e74= 6fe9ffc98e7d9511774 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --17233228161.89Fd3.67930 Date: Sat, 10 Aug 2024 16:46:56 -0400 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Suppose you want to grep over a filtered list = of files. Is there an idiomatic approach to solve this problem with rc?

I can only think of one erroneous method:

grep pattern `{find . -type f -name '*_te= st.go'}

I know that it's possible = to use find(1)'s -exec option. But find does not exist in Plan 9.
=

It seems like it is impossible to solve this pr= oblem with simple IO pipes. One must encode newlines somehow, be it C-style= \n, shell-style 'string', JSON or whatnot.

<= /div>
It also seems that newlines are the only symbol that breaks the i= diom `grep pattern `{cmd}`.
= --17233228161.89Fd3.67930--