Search Results

Search: Posts Made By: skye
5,095
Posted By skye
Help in parsing expect command's output and remove new lines EXPECT scripting
I am new to expect scripting.

expect "# " {send "hostname -i\r"}
expect {
-re "\r(.*)#" {set addr1 $expect_out(1,string)}
}

addr1 prints -
hostname -i
111.22.33.444

How do i get...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 07:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy