* SUMMARY: ZSh question
@ 2000-10-12 11:50 Nikola Milutinovic
0 siblings, 0 replies; only message in thread
From: Nikola Milutinovic @ 2000-10-12 11:50 UTC (permalink / raw)
To: tru64-unix-managers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-10-12 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-12 11:50 SUMMARY: ZSh question Nikola Milutinovic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox