Hello David, forum, I think I found the problem but still have a question. Here I attach text file. Do not worry - no viruses or anything like that. This file has 3 lines. When I run below, it shows 1st line only. What's so unusual about this file I do not get it.
while read k do print $k done < ./analyze_scripts1.sh.vie.lst Thank you, Gene Golub > Date: Wed, 27 Mar 2013 17:23:57 -0400 > From: [email protected] > To: [email protected] > Subject: Re: [ast-users] Need your advise on loop coding > > Subject: Re: [ast-users] Need your advise on loop coding > -------- > > > > Hello Forum, > > > > I came across of unexpected behavior of while loop reading values from file > > and > > calling function which uses while loop to read file as well. > > simple example is below. > > 'while read k' loop should read 3 lines from the file. > > But instead ... > > reads only 1st line. > > > > Can you please help. I show simplified script as an example. I use MKS > > Tools Kor > > n Shell for windows. > > > > #set -x > > set -K > > SCRDIR=c:/working/de1/3_26 > > > > F1=$SCRDIR/analyze_scripts1.sh.vie.lst > > > > function func > > { > > #set -x > > > > INP_SCR=$1 > > F2=$SCRDIR/analyze_scripts1.sh.cur5.lst > > > > while read CUR_OBJ > > do > > print "Cur_Obj: $CUR_OBJ" > > if [ $CUR_OBJ = $INP_SCR ];then > > print "Found the same" > > fi > > done< $F2 > > } > > > > while read k > > do > > print "===KKKK===: $k" > > func "$k" > > done < $F1 > > > > This looks like an MKS Toolkit bug. If you can reproduce the problem > with UWIN we will fix it. > > David Korn > [email protected] > _______________________________________________ > ast-users mailing list > [email protected] > http://lists.research.att.com/mailman/listinfo/ast-users
ÿþc : / w o r k i n g / d e 1 / 3 _ 2 6 / r o o t d i r / Q C 1 6 4 1 1 _ R D S . v R D S R A M P o s i t i o n D a t a . s q l c : / w o r k i n g / d e 1 / 3 _ 2 6 / r o o t d i r / Q C 1 8 9 3 7 _ 0 2 _ C l i e n t . v M a r g i n G r o u p D e t a i l s . s q l c : / w o r k i n g / d e 1 / 3 _ 2 6 / r o o t d i r / Q C 1 9 9 2 7 _ M H S e c u r i t y . v w _ C o n s t i t u e n t S e c u r i t y C o d e s . s q l
_______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
