Really need help on this one
- From: ram <ramjothikumar@xxxxxxxxx>
- Date: Wed, 25 Jun 2008 18:00:56 -0700 (PDT)
Hi all,
I am posting this again as i really need help for this. Just
point me in the right direction and i'll run with it.
Is there a way to read the output of a particular command into
a variable. I am thinking something in the lines of
#! /bin/sh
# -*- tcl -*- \
exec tclsh "$0" ${1+"$@"}
# This is required to declare that we will use Expect
package require Expect
spawn telnet host_ip
send "password\r"
send "date\r"
Here the kernel will output the date on the screen. Is there
a way to read this output into a string variable.
Thanks,
ram
.
- Follow-Ups:
- Re: Really need help on this one
- From: Bezoar
- Re: Really need help on this one
- From: Cameron Laird
- Re: Really need help on this one
- Prev by Date: Re: Using curly braces in a variable
- Next by Date: Re: Using curly braces in a variable
- Previous by thread: Capturing "stdout" into a text widget
- Next by thread: Re: Really need help on this one
- Index(es):
Relevant Pages
|