|
From: ram on 24 Jun 2008 20:57 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
|
Pages: 1 Prev: Using log_file command in Windows Next: Using curly braces in a variable |