From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4721 invoked from network); 28 Jun 1997 05:19:49 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 28 Jun 1997 05:19:49 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA02954; Sat, 28 Jun 1997 01:12:23 -0400 (EDT) Resent-Date: Sat, 28 Jun 1997 01:12:04 -0400 (EDT) To: zsh-users@math.gatech.edu Path: mason From: mason@primenet.com.au (Geoff Wing) Newsgroups: lists.zsh.users Subject: Re: lines as array elements Date: 28 Jun 1997 05:15:48 GMT Organization: PrimeNet Message-ID: References: <199706272300.RAA00662@ipecac.Central.Sun.COM> Reply-To: mason@primenet.com.au NNTP-Posting-Host: coral.primenet.com.au X-Newsreader: slrn (0.9.3.2 UNIX) Resent-Message-ID: <"nSuKl.0.ij.aq9jp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/923 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On 28 Jun 1997 09:05:49 +1000, Steve Talley wrote: Just a couple of optimisations: :#!/bin/zsh : :IFS=" :" : :i=1; :for line in `cat file` for line in `< file` :do : x[$i]=$line : i=`expr $i + 1` let i++ :done -- Geoff Wing [mason@primenet.com.au] Technical Manager Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy Facsimile: +61-3-9819 3788 Web : Mobile : 0412 162 441