Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
field splitting behavior
- X-seq: zsh-users 4510
- From: Paul Lew - remove nospam when reply <paullew@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: field splitting behavior
- Date: Tue, 27 Nov 2001 11:04:47 -0800
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Take a look at the following:
> var='foo:bar'
> echo ${(@)${(s/:/)var}[1]}
foo
> var='foobar'
> echo ${(@)${(s/:/)var}[1]}
f
So why it did field splitting on each character when there is no
separator ':' found? I would expect 'foobar' on the output.
Thanks in advance..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author