zsh-users
 help / color / mirror / code / Atom feed
From: mason@primenet.com.au (Geoff Wing)
To: zsh-users@math.gatech.edu
Subject: Re: lines as array elements
Date: 28 Jun 1997 05:15:48 GMT	[thread overview]
Message-ID: <slrn5r97g4.4ij.mason@coral.primenet.com.au> (raw)
In-Reply-To: <199706272300.RAA00662@ipecac.Central.Sun.COM>

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 : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441


  reply	other threads:[~1997-06-28  5:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-27 23:00 Steve Talley
1997-06-28  5:15 ` Geoff Wing [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-06-27 22:38 Jose Unpingco
1997-06-28  6:03 ` Zoltan Hidvegi

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=slrn5r97g4.4ij.mason@coral.primenet.com.au \
    --to=mason@primenet.com.au \
    --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).