[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] exec



I'm having some trouble with an exec command. The error is:


----

child killed: write on pipe with no readers
    while executing
"exec tac routertrace.tr | awk -f getrouterloss.awk - [expr [$ns now] -
.25] [$ns now] "
    (procedure "report" line 9)
    invoked from within
"report"

---

The tcl script is:

$ns flush-trace
set lossprint "$lossprint [exec tac routertrace.tr | awk -f
getrouterloss.awk - [expr [$ns now] - .25] [$ns now] ]"

---
The AWK script

BEGIN {
  loss = 0
  mintime = ARGV[2]
  maxtime = ARGV[3]
  ARGC = 2
}

$1 == "d" && $2 > mintime && $2 < maxtime {loss+=1}
$2 < mintime {exit}
END {
   print loss
}

---

The router trace file is a normal router trace file. Anyone have any
ideas? 
 -Will