I am telneting from Windows into a HPUX box,
In UX this command for setting the variable V
works fine. What is the correct syntax to achieve the
same results within Activestate? I've tried everything I can
think of.
set V [exec grep -E "^EVEREST" Aresults]
Thanks,
Dave Mairs
The question isn't clear. What does telnet have to do with the Tcl command mentioned? 'grep' the command isn't standard on Windows, so if you want that to work, you need to get an external grep executable, or rewrite to do the grep in pure Tcl.
After telneting (using Windows/Expect) to get to my UUT (UX box) I needed to be able to do the command:
set V [exec grep -E "^EVEREST" Aresults] "Which works with UNIX/Expect"
what I have found through help from people such as yourself that what I needed to do is:
expect {
-re $prompt {
set A [send "grep 'HW ADDRESS' /tmp/$PF\r\n"]
expect -re "\n(.*)\n$prompt" {
send_user "\n$expect_out(buffer),$expect_out(1,string)\n"
}
}
}