home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / tcl / 2479 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.3 KB  |  38 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!gumby!wupost!eclnews!wucs1!omar
  3. From: omar@wucs1.wustl.edu (Omar El-Ghazzawy)
  4. Subject: Re: blank errors from exec -> can't catch
  5. Message-ID: <1993Jan27.162358.2447@wuecl.wustl.edu>
  6. Sender: usenet@wuecl.wustl.edu (News Administrator)
  7. Nntp-Posting-Host: wucs1
  8. Organization: Washington University, St. Louis MO
  9. References: <1k3nu5INNi4t@cae.cad.gatech.edu>
  10. Date: Wed, 27 Jan 1993 16:23:58 GMT
  11. Lines: 25
  12.  
  13. In article <1k3nu5INNi4t@cae.cad.gatech.edu> estephen@whosnext.cad.gatech.edu (Eric R Stephens) writes:
  14. >I running non-background execs which call both compiled programs and  
  15. >shell scripts.  The results are sent to files and I don't believe  
  16. >that any errors are being generated from the outside runs.  I've been  
  17. >getting blank line followed by a trace to my exec.  I've tried  
  18. >catching the exec and I still get the same results.  How can I debug  
  19. >this it is exiting the proc.
  20.  
  21. I was having the same problem... I was doing something like:
  22.  
  23. catch {set foo [exec rsh sol uustat -a| grep admin]}
  24. puts stdout $foo
  25.  
  26. when there was no text returned, it caused an error, hence my use of catch.
  27. But then it would say that it did not know about the variable "foo".  So
  28. I solved it like this:
  29.  
  30. set foo ""
  31. catch {set foo [exec rsh sol uustat -a| grep admin]}
  32. puts stdout $foo
  33.  
  34. this worked fine.
  35.  
  36.  
  37.  
  38.