Re: remove double quote character from file names
- Reply: Polytropon : "Re: remove double quote character from file names"
- In reply to: Polytropon : "Re: remove double quote character from file names"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Feb 2023 10:49:27 UTC
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>