🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.tcl
Article #584

Re: TCL + TELNET

#584
From: Wojciech Kocjan
Date: Tue, 23 Feb 2010 12:48
21 lines
1466 bytes
On Wed, 08 Apr 2009 11:31:27 +0200, <souaveck@gmail.com> wrote:
> Popelnilem w zwiazku z tym nastepujace makro:
>
>   set f [open "|plink -telnet servername -l login -pw password" "w"]
>   fconfigure $f -blocking 0 -buffering none
>   puts -nonewline $f "mkdir testdir\n"
>   close $f

Sprobuj zrobic kilka rzeczy:
1/ po puts daj nastepujacy kod:
flush $f
after 10000
puts "Output:\n[read $f]"
(tryb open chyba musisz zmienic z "w" na "r+")

2/ opcja -m pozwala podac polecenia do wykonania - sprobuj na poczatek  
zrobic commands.sh, wrzuc tam to mkdir i recznie odpal plink -telnet -m  
commands.sh ... - potem tak samo z Tcla

-- 
WK
Technical Details
Message-ID: <op.u8ky7vq04mdq54@szarepudlo.net.home>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <fe5ac05a-eeed-4470-b852-29340ff792f3@r36g2000vbr.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Wojciech Kocjan" <wojciechka@gazeta.pl>
Newsgroups: pl.comp.lang.tcl
Subject: Re: TCL + TELNET
Date: Tue, 23 Feb 2010 13:48:57 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 21
Message-ID: <op.u8ky7vq04mdq54@szarepudlo.net.home>
References: <fe5ac05a-eeed-4470-b852-29340ff792f3@r36g2000vbr.googlegroups.com>
NNTP-Posting-Host: wojciech1354.net.autocom.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1266929342 20372 213.134.174.50 (23 Feb 2010 12:49:02 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Tue, 23 Feb 2010 12:49:02 +0000 (UTC)
To: souaveck@gmail.com
X-User: wojciechka
User-Agent: Opera Mail/10.10 (Win32)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit