bug-bash
[Top][All Lists]
Advanced

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

Re: Question on $@ vs $@$@


From: Steffen Nurpmeso
Subject: Re: Question on $@ vs $@$@
Date: Tue, 27 Aug 2024 22:02:34 +0200
User-agent: s-nail v14.9.25-599-g5c75a327b2

Chet Ramey wrote in
 <a93a3e4f-239c-49ae-995c-28db790965a5@case.edu>:
 |On 8/26/24 8:21 PM, Steffen Nurpmeso wrote:
 |> Chet Ramey wrote in
 |>   <bcb2ec08-42a1-4dff-9941-9f562f123bc8@case.edu>:
 |>|On 8/23/24 5:47 PM, Steffen Nurpmeso wrote:
 |>|>   If IFS has a value other than the default, then sequences of the
 |>|>   whitespace characters space, tab, and newline are ignored at the
 |>|>   beginning and end of the word, as long as the whitespace
 |>|>   character is in the value of IFS (an IFS  whitespace  charac‐
 |>|>   ter).
 |
 |So an IFS whitespace character is one that is in the value of IFS.
 |
 |>|>
 |>|> So IFS whitespace only if part of $IFS.
 |>|>
 |>|>   Any  character in IFS that is not IFS whitespace, along
 |>|>   with any adjacent IFS whitespace characters, delimits a field.
 |>|>
 |>|> So this "adjacent" even if *not* part of $IFS.
 |>|
 |>|I am genuinely curious how you concluded this, given the definition you
 |>|previously quoted.
 |> 
 |> It is only skipping ("trimming away") further data without further
 |> delimiting if only IFS whitespace is seen.
 |
 |The definition of IFS whitespace requires that the characters be part of
 |the value of IFS, so I'm wondering how you arrived at the "not part of
 |$IFS" above. Do you mean that IFS whitespace characters are the only ones

Hm, it is likely the doubling that confuses (some including) me.
It is redundant unless it would read

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

or so.  (Which i hope -- i have not yet started "working" here --
is what actually happens.)

 |where multiple instances of those characters can delimit a single 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.

 |If I can increase that section's clarity, I'm all for it. It's a confusing
 |topic.

Yes, that is true.  (But nothing beats the standard wording in
that respect.)

 |>|>   A sequence of IFS whitespace characters is also treated as
 |>|>   a delimiter.
 |>|>
 |>|> So this means that *regardless* of whatever $IFS is, the three IFS
 |>|> whitespace characters are $IFS anyway *if* that is set to
 |>|> a nin-empty non-default value.
 |>|
 |>|Nonsense.
 |> 
 |> How you interpret this "also" if not so, that is the question.
 |> My impression was that you had an eye on the standard text and
 |> tried to vaporise it down to the core.  Very well.
 |
 |You have to look at the definition of IFS whitespace.

Already forgotten at that point.

 --End of <a93a3e4f-239c-49ae-995c-28db790965a5@case.edu>

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

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