[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: |
Wed, 28 Aug 2024 02:03:54 +0200 |
User-agent: |
s-nail v14.9.25-599-g5c75a327b2 |
Robert Elz wrote in
<14146.1724799924@jacaranda.noi.kre.to>:
| 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.
That confuses me again, unfortunately i got a bug report and
distracted. I mean, i would
1. skip leading whitespace anyhow (IFS or not, which
is a "documented bug" here i would say),
for the shell this would be: leading IFS whitespace,
2. pass by none-to-many non-IFS bytes, the "field data", then
3.
a. if there is a non-IFS-whitespace character:
- delimit the field, even with empty "field data",
b. if there is a IFS-whitespace character:
- delimit the field only with non-empty "field data",
4. skip trailing (new leading) (IFS-) whitespace
|| 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.
Yes.
|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.
--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)
- Re: Question on $@ vs $@$@, (continued)
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/16
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/22
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/22
- Re: Question on $@ vs $@$@, Greg Wooledge, 2024/08/22
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/23
- Re: Question on $@ vs $@$@, Chet Ramey, 2024/08/26
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/26
- Re: Question on $@ vs $@$@, Chet Ramey, 2024/08/27
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/27
- Re: Question on $@ vs $@$@, Robert Elz, 2024/08/27
- Re: Question on $@ vs $@$@,
Steffen Nurpmeso <=
- Re: Question on $@ vs $@$@, Robert Elz, 2024/08/28
- Re: Question on $@ vs $@$@, Chet Ramey, 2024/08/29
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/29
- Re: Question on $@ vs $@$@, Robert Elz, 2024/08/24
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/24
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/24
- Re: Question on $@ vs $@$@, Lawrence Velázquez, 2024/08/24
- Re: Question on $@ vs $@$@, Lawrence Velázquez, 2024/08/24
- Re: Question on $@ vs $@$@, Chet Ramey, 2024/08/26
- Re: Question on $@ vs $@$@, Steffen Nurpmeso, 2024/08/26