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 02:21:16 +0200
User-agent: s-nail v14.9.25-599-g5c75a327b2

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 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.

 |>   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.

Anyhow, except for this manual thing that is possibly hard to
grasp for shell non-experts, this is all off-topic for bug-bash@,
and i apologize for the last messages.  It all roots in two false,
or say, non shell-compatible, ways of expanding variables.  (It
was explicitly documented not to perform word splitting, and,
i admit, have not reread the standard before starting the split
implementation, and there i fell.)

 |-- 
 |``The lyf so short, the craft so long to lerne.'' - Chaucer
 |   ``Ars longa, vita brevis'' - Hippocrates

So it is.

 |Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/
 --End of <bcb2ec08-42a1-4dff-9941-9f562f123bc8@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]