From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: unpingco@mpl.ucsd.edu (Jose Unpingco)
Cc: zsh-users@math.gatech.edu
Subject: Re: lines as array elements
Date: Sat, 28 Jun 1997 02:03:15 -0400 (EDT) [thread overview]
Message-ID: <199706280603.CAA05090@hzoli.home> (raw)
In-Reply-To: <9706272238.AA12078@cryptica.UCSD.EDU> from Jose Unpingco at "Jun 27, 97 03:38:18 pm"
> what I'd like to do is get each line into an array element like
[...]
> I've tried x=(`cat file`) but that splits on the spaces between the
> numbers. I've looked at the IFS variable and tried to change it to
> newline but that doesn't work as expected.
There were several solutions, but here is a simple one:
x=( "${(f)$(< file)}" )
Zoltan
next prev parent reply other threads:[~1997-06-28 6:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-27 22:38 Jose Unpingco
1997-06-28 6:03 ` Zoltan Hidvegi [this message]
1997-06-27 23:00 Steve Talley
1997-06-28 5:15 ` Geoff Wing
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=199706280603.CAA05090@hzoli.home \
--to=hzoli@frontiernet.net \
--cc=unpingco@mpl.ucsd.edu \
--cc=zsh-users@math.gatech.edu \
/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).