Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "joining" an array with tabs (default is space)
- X-seq: zsh-users 13563
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: "joining" an array with tabs (default is space)
- Date: Tue, 9 Dec 2008 19:40:42 +0000
- In-reply-to: <b11ea23c0812091127g19b6b55bqdefd4f30701cddf3@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <b11ea23c0812091127g19b6b55bqdefd4f30701cddf3@xxxxxxxxxxxxxx>
On Tue, 9 Dec 2008 11:27:38 -0800
"Webb Sprague" <webb.sprague@xxxxxxxxx> wrote:
> If I set IFS='\t', it works great with read -A LINE. However I want
> to join the output using '\t' instead of spaces-- is there a simple
> way to do that? I can write a for loop, or maybe recycle print -f
> "\t%s", or maybe use columns in the print, but I was hoping for a
> super graceful (ie typical zsh) approach.
${(pj.\t.)array}
It's a bit cryptic, but the documentation is there under "Parameter
Expansion Flags" in the zshexpn manual.
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author