${name:W:<separator>:}
: Apply to each word with separator
Applies the immediately following modifier on each word in the string, but splits at <separator>
.
Links
Examples
- Replace first occurrence in each word
- Output:
1 2
value="a_aa_aaa_aaaa" echo $value:W:_:s/a/z/
1
z_za_zaa_zaaa
BashSupport Pro 是一款支持 W** 的 **Zsh 集成开发环境 - 立即试用!