bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on $@ vs $@$@


From: Robert Elz
Subject: Re: Question on $@ vs $@$@
Date: Wed, 28 Aug 2024 06:05:24 +0700

    Date:        Tue, 27 Aug 2024 22:02:34 +0200
    From:        Steffen Nurpmeso <steffen@sdaoden.eu>
    Message-ID:  <20240827200234.95X76_wN@steffen%sdaoden.eu>


  |   Any character in IFS delimits a field, adjacent IFS whitespace
  |   characters are then ignored.

Not quite.   Any sequence of any amount of IFS whitespace, and no
more than one other IFS character delimits a field.

  | To the contrary i would now say that with a non-default non-empty
  | $IFS only IFS characters that are not also IFS whitespace create
  | empty fields.

The preconditions there are irrelevant.
Only IFS chars that are not IFS whitespace create empty fields.

Where IFS is empty, there are no IFS chars, hence nothing delimits
a field.   When IFS is unset (default case) it consists of $' \t\n'
(there is no difference whatever, for field splitting, or "$*" for
that matter) between an unset IFS and IFS=$' \t\n'

  |  |You have to look at the definition of IFS whitespace.
  | Already forgotten at that point.

Unfortunately, when reading the standard, you cannot forget a
single word of it.  Everything (normative) applies.

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]