Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I make "set" quiet?

763 views
Skip to first unread message

Phil

unread,
Aug 1, 2001, 1:34:46 PM8/1/01
to
Is there a way to quiet down the "set" command? I don't want it to
automatically print when I do a set.

Ex:

=>set a 12
12
=>

I want:

=> set -quiet a 12
=>

I have a procedure that I run and I don't want the clutter of all the
set command returns values.

Thanks,
Phil

David Gravereaux

unread,
Aug 1, 2001, 1:42:41 PM8/1/01
to
Hi Phil,

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\WINNT\system32>tclsh84
% rename set oset
% proc set {var {val {}}} {
if {$val == {}} {
return [uplevel 1 oset $var]
} else {
uplevel 1 oset $var $val
}
return
}
% set a 3
% set a
3
%
--
David Gravereaux <davy...@pobox.com>

Jeff Hobbs

unread,
Aug 1, 2001, 2:22:40 PM8/1/01
to Phil
Phil wrote:
>
> Is there a way to quiet down the "set" command? I don't want it to
> automatically print when I do a set.

Eh, why? It is just always the last command that returns output
to the screen in interactive mode. In a script, this is all
just moot anyway.

--
Jeff Hobbs The Tcl Guy
Senior Developer http://www.ActiveState.com/
Tcl Support and Productivity Solutions

Glenn Jackman

unread,
Aug 1, 2001, 2:31:22 PM8/1/01
to
Note that this behaviour only expresses itself in the interactive
shell -- all command results are sent to stdout.
Tcl script execution is quiet however.

See also
http://mini.net/tcl/689.html

--
Glenn Jackman

0 new messages