tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Nikola Milutinovic <Nikola.Milutinovic () ev ! co ! yu>
To: tru64-unix-managers
Subject: SUMMARY: ZSh question
Date: Thu, 12 Oct 2000 11:50:54 +0000	[thread overview]
Message-ID: <97135105618904.tru64-unix-managers.marc@archive.invalid> (raw)

Hi all.

Many responses in a short time. :-)

Thanks to:
        Jean-Pol.Guillement@math.univ-nantes.fr (Jean-Pol Guillement) 
        "Gavin Kreuiter" <gavin@transactive.usko.com>
        "Rost, Werner" <Werner.Rost@boge.mannesmann.de>
        "Frank-Peter Reich" <frank-peter.reich@nowis.de>

The first three respondants gave a working solution:

cat file.cfg | wnile read i
  do
  ...
  done

Frank sugested PERL solution:

#!/usr/bin/perl

@file_array = <file.cfg>;           # Read in the complete File

foreach (@file_array) {             # Complete line is in the implizit
variable $_

   my ($item, $value) = split();    # Split $_ in the other variables

   ...                              # Do anything with the variables
}

Thank you all. I have already found an awk workaround for my problem,
but I'll keep this in mind in the future. Heck, I might even switch back
to ZSh builtins. Or switch forward, to Perl :-)

Nix.
-- 
"When you find that your views match [those of] the majority, it's
     time to pause and reflect."  -- Samuel L. Clemens, a.k.a. Mark
Twain

                 reply	other threads:[~2000-10-12 11:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox