${name:w}
: Apply to each word
Applies the immediately following modifier on each word in the string.
Links
Examples
- Replace first occurrence in each word
- Output:
1 2
value="a aa aaa aaaa" echo $value:ws/a/z/
1
z za zaa zaaa
BashSupport Pro is a Zsh IDE with support for $varName:w – try it now!