549 Documents $ od -c analyze_scripts1.sh.vie.lst 0000000 377 376 c \0 : \0 / \0 w \0 o \0 r \0 k \0 0000020 i \0 n \0 g \0 / \0 d \0 e \0 1 \0 / \0 0000040 3 \0 _ \0 2 \0 6 \0 / \0 r \0 o \0 o \0 0000060 t \0 d \0 i \0 r \0 / \0 Q \0 C \0 1 \0 0000100 6 \0 4 \0 1 \0 1 \0 _ \0 R \0 D \0 S \0 0000120 . \0 v \0 R \0 D \0 S \0 R \0 A \0 M \0 0000140 P \0 o \0 s \0 i \0 t \0 i \0 o \0 n \0 0000160 D \0 a \0 t \0 a \0 . \0 s \0 q \0 l \0 0000200 \r \0 \n \0 c \0 : \0 / \0 w \0 o \0 r \0 0000220 k \0 i \0 n \0 g \0 / \0 d \0 e \0 1 \0 0000240 / \0 3 \0 _ \0 2 \0 6 \0 / \0 r \0 o \0 0000260 o \0 t \0 d \0 i \0 r \0 / \0 Q \0 C \0 0000300 1 \0 8 \0 9 \0 3 \0 7 \0 _ \0 0 \0 2 \0 0000320 _ \0 C \0 l \0 i \0 e \0 n \0 t \0 . \0 0000340 v \0 M \0 a \0 r \0 g \0 i \0 n \0 G \0 0000360 r \0 o \0 u \0 p \0 D \0 e \0 t \0 a \0 0000400 i \0 l \0 s \0 . \0 s \0 q \0 l \0 \r \0 0000420 \n \0 c \0 : \0 / \0 w \0 o \0 r \0 k \0 0000440 i \0 n \0 g \0 / \0 d \0 e \0 1 \0 / \0 0000460 3 \0 _ \0 2 \0 6 \0 / \0 r \0 o \0 o \0 0000500 t \0 d \0 i \0 r \0 / \0 Q \0 C \0 1 \0 0000520 9 \0 9 \0 2 \0 7 \0 _ \0 M \0 H \0 S \0 0000540 e \0 c \0 u \0 r \0 i \0 t \0 y \0 . \0 0000560 v \0 w \0 _ \0 C \0 o \0 n \0 s \0 t \0 0000600 i \0 t \0 u \0 e \0 n \0 t \0 S \0 e \0 0000620 c \0 u \0 r \0 i \0 t \0 y \0 C \0 o \0 0000640 d \0 e \0 s \0 . \0 s \0 q \0 l \0 \r \0 0000660 \n \0 0000662
From: [email protected] [mailto:[email protected]] On Behalf Of gene golub Sent: Thursday, March 28, 2013 8:20 AM To: David Korn; [email protected] Subject: Re: [ast-users] Need your advise on loop coding 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]<mailto:[email protected]> > To: [email protected]<mailto:[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]<mailto:[email protected]> > _______________________________________________ > ast-users mailing list > [email protected]<mailto:[email protected]> > http://lists.research.att.com/mailman/listinfo/ast-users
_______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
