Subject: Re: shell script question
To: Peter Seebach <seebs@plethora.net>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-help
Date: 02/11/2003 11:54:42
i'm testing the script now... the advisory was to do
while read i j < file1
do
mv file2 file2.tmp
sed -e "s/\ $i\$/\ $j/" < file2.tmp > file2
done
where file1 contains
value1 replace1
value2 replace2
and file2 contains something like
.... valueX
.... valueY
.... valueX
.... valueZ
i.e. to iteratively do the replacement for all sets valueX - replaceX
problem is that the "while command" reads all the time only the first
line of the file :o( what i'm doing bad? (script shell is /bin/ksh)
regards,
lubos
--
-
#################################################
Lubos Vrbka
National Centre for Biomolecular Research
Masaryk university, Brno, Czech Republic
shnek@chemi.muni.cz
http://www.chemi.muni.cz/~shnek
tel. +420 541 129 508
#################################################