From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4807 invoked from network); 28 Jun 1997 06:08:19 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 28 Jun 1997 06:08:19 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA03484; Sat, 28 Jun 1997 01:59:52 -0400 (EDT) Resent-Date: Sat, 28 Jun 1997 01:59:21 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199706280603.CAA05090@hzoli.home> Subject: Re: lines as array elements In-Reply-To: <9706272238.AA12078@cryptica.UCSD.EDU> from Jose Unpingco at "Jun 27, 97 03:38:18 pm" To: unpingco@mpl.ucsd.edu (Jose Unpingco) Date: Sat, 28 Jun 1997 02:03:15 -0400 (EDT) Cc: zsh-users@math.gatech.edu X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"YKjqK.0.ir.uWAjp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/924 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > 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