From: Wataru Kagawa <wkagawa@jota.gsc.riken.go.jp>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-users@sunsite.dk, Wataru Kagawa <wkagawa@jota.gsc.riken.go.jp>
Subject: Re: joining array elements
Date: Fri, 13 Jan 2006 00:16:09 +0900 [thread overview]
Message-ID: <099C7AA9-7279-400E-A8A4-8C3509666DF6@jota.gsc.riken.go.jp> (raw)
In-Reply-To: <EXCHANGE03bXb4rzQ6M00002ae3@exchange03.csr.com>
Hi Peter,
I am not sure if I understand your question about the nullglob
option, but regardless of the nullglob option,
echo $foo
didn't output the right thing. The difference between having or not
having the nullglob option was, no output when nullglob option was
set versus the following output when the nullglob option was turned off.
zsh: no matches found: David\nMatt\nBob[return]Sara[return]Tim
print -r "$foo" worked under both conditions. Actually, I wanted to
pass the value to a command (zsh function), so the two examples you
gave me,
> usernames=(Bob Sara Tim)
> usernames2=(David Matt ${(j.[return].)~~usernames})
> foo=${(F)~~usernames2}
>
> usernames=(Bob Sara Tim)
> usernames2=(David Matt "${(j.[return].)usernames}")
> foo="${(F)usernames2}"
are exactly what I was looking for. They work perfectly.
Thank you very much. I really appreciate all the help.
Wataru Kagawa
prev parent reply other threads:[~2006-01-12 15:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-12 1:22 Wataru Kagawa
2006-01-12 1:41 ` Bart Schaefer
2006-01-12 1:59 ` Wataru Kagawa
2006-01-12 5:17 ` Wataru Kagawa
2006-01-12 9:10 ` Peter Stephenson
2006-01-12 11:44 ` Wataru Kagawa
2006-01-12 11:54 ` Peter Stephenson
2006-01-12 12:20 ` Wataru Kagawa
[not found] ` <10756.1137069559@logicacmg.com>
2006-01-12 13:01 ` Wataru Kagawa
2006-01-12 13:10 ` Peter Stephenson
2006-01-12 15:16 ` Wataru Kagawa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=099C7AA9-7279-400E-A8A4-8C3509666DF6@jota.gsc.riken.go.jp \
--to=wkagawa@jota.gsc.riken.go.jp \
--cc=pws@csr.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).