'read' sometimes truncates trailing field delimiter

2025-01-11 Thread MacBeth
Configuration Information [Automatically generated, do not change]: Machine: aarch64 OS: darwin23.4.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC -DDEFAULT_LOADABLE_BUILTINS_PATH='/opt/homebrew/Cellar/bash/5.2.37/lib/bash:/usr/local/lib/bash:/usr/lib/$ Machine Type: aarch64-apple-darwin

Re: 'read' sometimes truncates trailing field delimiter

2025-01-11 Thread Greg Wooledge
On Sat, Jan 11, 2025 at 08:54:43 -0600, MacBeth wrote: > It seems that `read` truncates a trailing delimiter if there is one less > variable argument than input fields and the last field is empty (trailing > delimiter). https://mywiki.wooledge.org/BashPitfalls#pf47 "It's a feature."