On Sun, 02 Apr 2023 09:32:20 +0700 Robert Elz <k...@munnari.oz.au> wrote:
> Date: Sat, 1 Apr 2023 19:44:10 -0400 > From: Saint Michael <vene...@gmail.com> > Message-ID: > <cac9csoaa0g97fzulurxmee6emrdum7zpzk+u20ymvwbjymv...@mail.gmail.com> > > | The compelling reason is: I may not know how many values are stored in the > | comma-separated list. > > Others have told you you're wrong, but this is not any kind of compelling > reason - you simply give one more variable name than you expected to need > (than you would have used otherwise) and then all the extra fields that > you wanted the shell to ignore will be assigned to it - which you are free > to ignore if you like, or you can test to see if anything is there, and > issue an error message (or something) if more fields were given than you > were expecting. Much better behaviour than the shell simply ignoring > data (silently). I would add to this that bash affords one the luxury of using read -a before proceeding to check the size of the resulting array. -- Kerin Millar