Skip to content

Commit

Permalink
More polish
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy C committed Jan 3, 2025
1 parent 1b96798 commit d140554
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/ref/chap-word-lang.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ list of all elements in `a`.
When the variable substitution is **unquoted**, there's no difference between
`[*]` and `[@]`:

$ IFS=x
$ A=(1 2 3)
$ printf '<%s>\n' ${A[*]}
<1>
Expand All @@ -233,6 +232,7 @@ When the variable substitution is **unquoted**, there's no difference between
When double-quoted, the `[*]` form joins the elements by the first character of
`IFS`:

$ IFS=x
$ printf '<%s>\n' "${A[*]}"
<1x2x3>

Expand Down Expand Up @@ -309,9 +309,9 @@ There are test operators with colons, and without:
case of a word list, e.g. generated by `$*` or `$@`, it tests whether there is
at least one element.

**With** the colon, the shell checks whether the value is **non-empty**. In
the case of a word list, the test is performed after joining the elements by a
space.
**With** the colon, the shell checks whether the value is **non-empty** (is not
the empty string). In the case of a word list, the test is performed after
joining the elements by a space.

Elements are joined by the first character of `IFS` only with double-quoted
`"${*:-}"`.
Expand Down

0 comments on commit d140554

Please sign in to comment.