script don't stop

Hello everybody!
I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out why. It is not a big problem since the script will continue if there are more "calls" in the script, but why is it "waiting"?
any ideas?

### Add the window numbers (last overlay, no -K (close plot system)).
#pstext: (x, y,  size(pts), angle(ccw),  fontno,  justify,  text)
set GMTFLAGS = "-O -N -G0/0/0 $GENOPT $RANGE $SIZE"
echo "   Calling:   pstext $GMTFLAGS >> $PSFILE"
#green, 14pts, RightTop BottomLeft
$AWK '{printf "%.1f %.1f 10 0 0 RT %s\n", $2, $3, $1}' $TMPFILE | pstext $GMTFLAGS >> $PSFILE

# commented away 081011
# # calls from Doris, cannot interactive...
# #%// BK 19-Jul-2000
# echo "   Calling:   viewanddel"
# rm -f $TMPFILE $GRDFILE $CPTFILE
# viewanddel $PSFILE

# ### EOF

exit 0 # added 081011

Try to monitor your script in the debug mode. Add this line below your #!/bin/ksh line:

set -x

Regards

I think its because $TMPFILE is empty or undefined. awk needs two arguments: your program string and a filename. If it gets no filename, it expects (and waits for) input from standard input. Next time, run the script and hit CTRL-D. Awk will terminate and the script will continue.

thanks!