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: Ralf Fassel <ralfixx@gmx.de>
Date: Thu Dec 22 2005 - 10:23:32 CET

* Bryan Oakley <oakley@bardo.clearlight.com>
| > set COMMAND ""
| > foreach arg $args {append COMMAND $arg;append COMMAND " "}
| > set COMMAND [string trim $COMMAND]
|
| The previous three statements could be replaced with this:
|
| set COMMAND [string trim [join $args " "]]

Since I suspect that these statements were thrown in to get rid of the
{ { } } I would recommend to get rid of them completely. They don't
achieve anything which is not already done by the TCL parser itself
and are likely to mess things up in case any arg contains stuff which
requires proper list treatment.

R'
Received on Fri Dec 23 19:02:55 2005