Skip to content

Capture output from program into LUA varaible?  #30

@rdrdrdrd95

Description

@rdrdrdrd95

First of all this is great! Fantastic work.

I want to replicate this functionality in TCL Expect:

#first step is to query the count from the program to build a loop count
#we use the -re tag to capture the site count from the output buffer after the token "Count: " and extend to the end of the whole output
expect $prompt
send -- "get_count\n"
expect -re {Count: (.*)\n.*}

set count $expect_out(1,string)
sleep 1
#sleeps are just to ensure we dont over-run the CLI

#we do not need to expect here since it was part of the last regex
#now we configure the output path
send -- "set_log_path $log_path\n"

Is this currently possible in the go implementation?

Thanks!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions