From nobody Thu Feb 16 17:45:09 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PHj5d17JJz3rDwd for ; Thu, 16 Feb 2023 17:45:25 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.riseup.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHj5b60f3z4Fr9 for ; Thu, 16 Feb 2023 17:45:23 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=riseup.net header.s=squak header.b=EaXwpG87; spf=pass (mx1.freebsd.org: domain of ralf-mardorf@riseup.net designates 198.252.153.129 as permitted sender) smtp.mailfrom=ralf-mardorf@riseup.net; dmarc=pass (policy=none) header.from=riseup.net Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4PHj5L6wcrzDqdF for ; Thu, 16 Feb 2023 17:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1676569522; bh=va6ZgvcQXR69mVfwqivqrIu3dWSD9GGcX4WAcol5inQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=EaXwpG87v5MIVBJ6WvMjI+f+x9e3TAMPO3LP1Gj/EMHs8pU8/34l9ICzvz6oLIUPg Bdl/Y6icVffq5No6YvasQxTq4PvNyTYkQq6xnd2rU5Em/g2Fe2APEC4fJWZKaP7rJB iQxgwqoj3CtsbUH1VE29iHVfxdK/8FLlM3csXQGg= X-Riseup-User-ID: 9F804A1DCDD9DC473566A0B112485F02E20740A29C6D3FCAEE91E4378BE23DC4 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4PHj5L2ZZqz1y7V for ; Thu, 16 Feb 2023 17:45:10 +0000 (UTC) Message-ID: Subject: Re: remove double quote character from file names From: Ralf Mardorf To: questions@freebsd.org Date: Thu, 16 Feb 2023 18:45:09 +0100 In-Reply-To: <20230216135811.d4ba5a8c.freebsd@edvax.de> References: <1398045780.627028.1676532009651@ichabod.co-bxl> <20230216112431.8252a3d4.freebsd@edvax.de> <20230216104927.c96efd845f0714a998b7ae9f@sohara.org> <20230216135811.d4ba5a8c.freebsd@edvax.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; DMARC_POLICY_ALLOW(-0.50)[riseup.net,none]; R_DKIM_ALLOW(-0.20)[riseup.net:s=squak]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[198.252.153.129:from]; RWL_MAILSPIKE_GOOD(-0.10)[198.252.153.129:from]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; ASN(0.00)[asn:16652, ipnet:198.252.153.0/24, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[riseup.net:dkim]; DKIM_TRACE(0.00)[riseup.net:+]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4PHj5b60f3z4Fr9 X-Spamd-Bar: ---- X-ThisMailContainsUnwantedMimeParts: N Hi, how about uncritical chars, excepted of the ", for example a"lnum.txt . Renaming without interaction is unsafe, since a duplicated name will overwrite an existing name, but with interaction, it could be an endless task. Instead of removing the " or replacing the " by another char, the only alternative that is safe and unlikely requires much time consuming interaction, is replacing the " by something like $(openssl rand -hex 4) but this results in odd file names like a6c41752dlnum.txt or by adding -n+1, e.g. alnum.txt-1001 . I wouldn't try to rename thousand of files, to get rid of " in file names. What if e.g. a script needs to read a"lnum.txt ? From where do come all the " in the file names? Maybe by sharing files with apps from different operating systems? If so, will a"lnum.txt renamed to alnum.txt-1001 become a"lnum.txt-1001 after sharing again?=20 Regards, Ralf