Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <200006021208.OAA31363@arnljot.lin.foa.se> X-Mailer: exmh version 2.1.1 10/15/1999 To: cygwin AT sourceware DOT cygnus DOT com Subject: awk problem with embedded awk scripts... From: Christian =?iso-8859-1?Q?J=F6nsson?= FOA =?iso-8859-1?Q?Informations=F6verf=F6ring?= X-face: 2tQjSw>|IA680lA7r'G9Y[jfoS>tTPw4-B#mQo_C+{6>^DWZP`o.h@ $outdesc" (procedure "_o4" line 26) (TestSuite create_flow_graph line 26) invoked from within "$self create_flow_graph $testname $flowgraphfile" (procedure "_o4" line 6) (TestSuite finish_flows line 6) invoked from within "_o4 finish_flows test_flows_unforced" and the tcl file containing the supposedly malfunctioning awk (code) has this: TestSuite instproc allmakeawk { } { set awkCode { BEGIN {prev=-1; tot_bytes=0; tot_packets=0; forced_total=0; unforced_total=0} { if ($5 != prev) { print " "; print "\"flow ",$5; prev = $5 } tot_bytes = $19-$11; forced_total= $16-$14; tot_packets = $10; tot_arrivals = $9; unforced_total = $14; if (unforced_total + forced_total > 0) { if ($14 > 0) { frac_packets = tot_packets/$14; } else { frac_packets = 0;} if ($17-$15 > 0) { frac_bytes = tot_bytes/($17-$15); } else {frac_bytes = 0;} if ($13 > 0) { frac_arrivals = tot_arrivals/$13; } else {frac_arrivals = 0;} if (frac_packets + frac_bytes > 0) { unforced_total_part = frac_packets * unforced_total / ( unforced_total + forced_total) forced_total_part = frac_bytes * forced_total / ( unforced_total + forced_total) print 100.0 * frac_arrivals, 100.0 * ( unforced_total_part +forced_total_part) } } } } return $awkCode } The problem is at print " "; print "\"flow ",$5; The first print statement when passed from tcl script code to the awk program hits something nasty. Now, the tcl used is a native (binary release) of tcl8.0.5 for win32... Any help or hint is greatly appreciated. TIA, /ChJ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com