Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fwd: more splitting travails
- X-seq: zsh-users 29451
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Fwd: more splitting travails
- Date: Fri, 12 Jan 2024 12:32:40 -0800
- Archived-at: <https://zsh.org/users/29451>
- In-reply-to: <CAH+w=7bAWOF-v36hdNjaxBB-5rhjsp97mAtyESyR2OcojcEFUQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <ca1761f1-6d8f-452a-b16d-2bfce9076e25@eastlink.ca> <CAH+w=7ZJsr7hGRvD8f-wUogPcGt0DMOcPyiYMpcwCsbBNkRwuQ@mail.gmail.com> <CAA=-s3zc5a+PA7draaA=FmXtwU9K8RrHbb70HbQN8MhmuXTYrQ@mail.gmail.com> <CAH+w=7bAWOF-v36hdNjaxBB-5rhjsp97mAtyESyR2OcojcEFUQ@mail.gmail.com>
On 2024-01-12 12:03, Bart Schaefer
wrote:
This was sent privately to me but pretty obviously
intended for the list.
I got a private copy from Mark, but with a cc to the list.
Well, here's where the exception to that "usually" comes
in.
cut ... I'll need time to digest all this ...
Yesss. When it's captured as one element I see the newlines
because are all there in the single element! ... it looks split
but it isn't !! So I think I'm getting closer to what I want but
actually I'm further way.
% vvar=("${(@f)"$(<testfile2)"}")
1 /aWorking/Zsh/Source/Wk 0 %
vvar=("${(@f)"$(<testfile2)"}") ; print -l "$vvar[@]"; print
"\n ... and the number of elements is: ..... $#vvar \n Ta-Taaaa
:-)
"
one two
three
four
five six seven
eight
... and the number of elements is: ..... 9
Ta-Taaaa :-)
... and that's not as Byzantine as it looks: " (@f) : read:
"include blank lines, and split on newlines (including empty
lines) " ... Yes?
Yes, more invisible differences. Old printout and new printout
look identical but internally they're chalk and cheese.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author