Date: Thu, 16 Feb 2023 10:49:27 +0000 From: Steve O'Hara-Smith <steve@sohara.org> To: questions@freebsd.org Cc: Polytropon <freebsd@edvax.de> Subject: Re: remove double quote character from file names Message-ID: <20230216104927.c96efd845f0714a998b7ae9f@sohara.org> In-Reply-To: <20230216112431.8252a3d4.freebsd@edvax.de> References: <d83c93ad-0eac-d41a-c7db-79a1e1bc62d8@nethead.se> <1398045780.627028.1676532009651@ichabod.co-bxl> <20230216112431.8252a3d4.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Feb 2023 11:24:31 +0100 Polytropon <freebsd@edvax.de> 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 <steve@sohara.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230216104927.c96efd845f0714a998b7ae9f>