| Deutsch English Français Italiano |
|
<vc0ffk$ml8n$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Rich <rich@example.invalid>
Newsgroups: comp.lang.tcl
Subject: Re: Why do we need "eval"? (Expect question)
Date: Fri, 13 Sep 2024 04:36:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <vc0ffk$ml8n$2@dont-email.me>
References: <vbv03t$1t4qm$1@news.xmission.com> <vbv8kd$blsb$1@dont-email.me>
Injection-Date: Fri, 13 Sep 2024 06:36:04 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="31c2bedd965bbd9ffe53b26dfc990353";
logging-data="742679"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+e/GshcZv00dOzBgPbIShn"
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64))
Cancel-Lock: sha1:OB/LDwFvlxeIAZgCYoQrMhfSeDc=
Bytes: 1412
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.