${(j:string:)…}
: Splitting with shell parsing
Join array elements using the option as string separator.
Options
string
- The string which is used to join the array elements.
Links
Examples
- Join array elements into lines
- Output:
1 2 3
data=(first second third) # p to support escape sequence \n echo ${(pj:\n:)data}
1 2 3
first second third
BashSupport Pro ist eine Zsh IDE mit Unterstützung für ${(j)…} - probieren Sie es jetzt aus!