From: ram on
Hi Everyone,
Is there a way to read the output of a particular command
into a variable. I am thingking 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