From nobody Thu Feb 16 10:49:27 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 4PHWt11Ryxz3q1pF for ; Thu, 16 Feb 2023 10:49:45 +0000 (UTC) (envelope-from 4250.82.1d4f90006e9977d.f81c2e706eb5a61f78704c0caa7f474b@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PHWt03kNkz3xk8 for ; Thu, 16 Feb 2023 10:49:44 +0000 (UTC) (envelope-from 4250.82.1d4f90006e9977d.f81c2e706eb5a61f78704c0caa7f474b@email-od.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1676544585; x=1679136585; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info:subject:to:from:cc:reply-to; bh=ivFDGazgALleyw4eycLoDG9quOzDSNAthN9ms/2frI8=; b=ZpwtIcifcm+eKlEu0JPGe7LOm0x+QTHlm/KiTIQGTRWyODYRJNccFKM4MFGv6tEbJfkuYKydrrqJCRvt+u97kB8Fh66Uekr9k8iYLGrd3FKEXrRshBP8w3Bc3RzSCor3yDvwGmatkMC6rwZ8zD0Vli0LO0k78cFSfevtZFZ76lk= X-Thread-Info: NDI1MC4xMi4xZDRmOTAwMDZlOTk3N2QucXVlc3Rpb25zPWZyZWVic2Qub3Jn Received: from r1.us-east-2.aws.in.socketlabs.com (r1.us-east-2.aws.in.socketlabs.com [142.0.189.1]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 16 Feb 2023 05:49:29 -0500 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r1.us-east-2.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 16 Feb 2023 05:49:28 -0500 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1pSbpP-000KwG-9v; Thu, 16 Feb 2023 10:49:27 +0000 Date: Thu, 16 Feb 2023 10:49:27 +0000 From: Steve O'Hara-Smith To: questions@freebsd.org Cc: Polytropon Subject: Re: remove double quote character from file names Message-Id: <20230216104927.c96efd845f0714a998b7ae9f@sohara.org> In-Reply-To: <20230216112431.8252a3d4.freebsd@edvax.de> References: <1398045780.627028.1676532009651@ichabod.co-bxl> <20230216112431.8252a3d4.freebsd@edvax.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) X-Clacks-Overhead: "GNU Terry Pratchett" 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4PHWt03kNkz3xk8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Thu, 16 Feb 2023 11:24:31 +0100 Polytropon wrote: > exist in the heap of files to be processed. Selecting a good > delimiter for input files is hard. Using the "IFS = \n" approach > works - as long as there are no newlines in filenames (which > I'm not sure could also be allowed)... ;-) Newlines are indeed allowed in filenames viz: ✓ steve@steve ~/tmp $ touch 'a file' ✓ steve@steve ~/tmp $ echo * a file ✓ steve@steve ~/tmp $ rm 'a file' There are only two byte values not allowed in the 254 bytes of a filename - NUL and /. The ls command suppresses most of the nastier possibilities and displays a ? these days hence the use of echo above. In times past I have constructed confusing directories with the aid of CR and BS and even the occasional BEL. -- Steve O'Hara-Smith