Sujet : Re: Why do we need "eval"? (Expect question)
De : rich (at) *nospam* example.invalid (Rich)
Groupes : comp.lang.tclDate : 13. Sep 2024, 05:36:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc0ffk$ml8n$2@dont-email.me>
References : 1 2
User-Agent : tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Harald Oehlmann <
wortkarg3@yahoo.com> wrote:
spawn -noecho printf {\t%s\n} {*}$argv
eventually, this works to:
spawn -noecho printf \t%s\n {*}$argv
Do note that the second one causes \t and \n to be interpreted by Tcl's
parser, so printf gets passed a literal tab and literal newline in its
parameter list. The first passes the \ and t characters on to printf,
and then printf does the interpretation.
Both likely work fine for printf, but may not work fine for all
possible external commands.