ZSh question

From: Nikola Milutinovic <Nikola.Milutinovic_at_ev.co.yu>
Date: Thu, 12 Oct 2000 13:02:34 +0200

Hi all.

A simple ZSh and possibly other shells related question.

I have a (config) file with lines like this:

ITEM1 VALUE1
ITEM2 VALUE2
.....

I would like to parse it and I have tried the following:

for i in `cat file.cfg`
  do
  ...
  done

The problem is $i is not a line of CFG file, but a single word. Is there
a way to make $i be the entire line, like awk would do it?

awk '{ ...processing... }' file.cfg

Nix.
Received on Thu Oct 12 2000 - 10:59:20 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT