Re: (newbie) storing outputs from all lines of procs into a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: (newbie) storing outputs from all lines of procs into a string

From: <just80n@gmail.com>
Date: Mon Dec 19 2005 - 17:52:10 CET

nevermind; correct code is :

proc ex {COMMAND} {
set OUTPUT ""
rename puts _puts
proc puts {args} { append OUTPUT $args "\n"; eval _puts $args }
eval $COMMAND
rename puts {}
rename _puts puts
return $OUTPUT
}
Received on Fri Dec 23 19:02:14 2005