Closed zffocussss closed 1 year ago
That is shorthand for the following:
for version in "$@"; do
i.e. looping over the args to the script. When the args list is empty in this script, it is set by the eval "set -- $versions"
of this block:
https://github.com/docker-library/busybox/blob/164603caaa94899332207e45ca06c1b467108851/apply-templates.sh#L16-L19
it is so interesting,can you please give me a link to this syntax,as I never used/known about it.
what is this meaning ? ${dir////-}
for dir; do
base="busybox:${dir////-}"
done
it is so interesting,can you please give me a link to this syntax,as I never used/known about it.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_03
what is this meaning ? ${dir////-}
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion (specifically, ${parameter//pattern/string}
- replace all /
with -
)
it is so interesting,can you please give me a link to this syntax,as I never used/known about it.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_03
what is this meaning ? ${dir////-}
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion (specifically,
${parameter//pattern/string}
- replace all/
with-
)
it do work,thanks @tianon
https://github.com/docker-library/busybox/blob/164603caaa94899332207e45ca06c1b467108851/apply-templates.sh#L32C1-L50C5
can some guys tell me how this block work,as version is not a array variables.