I have the following section in my code expect code:
set command "echo $output"spawn bashexpect "$ "send "$command\r"expect "$command\r\n"
Where output
is a multi-line string obtained from $expect_out(buffer)
.
I get the output:
$ echo thisthis$ isis: command not found$ a multilinea: command not found$string
Is there any way I can obtain the above string instead in a single sequence, the same way we'd echo a multiline string on bash? I'm using echo because I want to do some Bash post-processing with a pipe later.