function put_SwVersion_MENAME()
{
output=$(expect -c '
log_user 0
match_max 2000
spawn ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null username@IP
expect "*?Password:*"
send "dummmy\r"
expect "*#"
send "cat /storage/system/abcd.txt\r"
expect "cat /torage/system/abcd.txt\n"
puts '"\$expect_out(buffer)"'
')
echo $output
return $TRUE
}
put_SwVersion_MENAME
The output value is containing the prompt rather than the send output how can i parse to get the correct value CAT?