2,805 questions
0
votes
1
answer
53
views
Corrupted output using CECP (XBoard/WinBoard) using tcl
I made a Tcl script which dialogs with a chess engine (using CECP also known as XBoard or WinBoard protocol), to obtain an analysis of a chess game. It seems to work correctly at the beginning but ...
0
votes
0
answers
103
views
Databricks pipeline fails on execute python script for expectations with error: Update FAILES; _UNCLASSIFIED_PYTHON_COMMAND_ERROR
I'm working on a databricks pipelibe and trying to create and apply expectations on a pipeline. I have the code but I keep getting an error that I cannot resolve.There is not much to go on, but I keep ...
3
votes
4
answers
158
views
Is it the tty, the shell, or both that is responsible for echo-ing user input?
I seem to be observing conflicting evidence regarding how the tty and the shell share responsibility for displaying user input.
In the following interactive session, user input is no longer echoed to ...
0
votes
0
answers
32
views
Is it possible to configure expect to not close stdout when stdin is closed?
Consider the following expect script:
#!/usr/bin/env expect -f
send "Hello world"
expect eof
send "Goodbye world"
I would like the output to be Hello world followed by Goodbye ...
1
vote
1
answer
103
views
How do I feed standard input to an Expect script to spawns a shell and collect standard output?
Consider the following Expect and Bash scripts:
spawn-bash.exp
#!/usr/bin/env expect
spawn bash
stty raw -echo
log_user 0
remove_nulls 0
expect {
-i $spawn_id "?" {
send_user -- [...
0
votes
1
answer
53
views
Is it possible to make expect handle null bytes?
The book Exploring Expect suggests that expect is able to wait for zero-value bytes, but it looks like it is matching on empty strings and then segfaulting:
Consider the following short expect script.
...
0
votes
1
answer
29
views
Is it possible to simulate expect's interact fully without using interact?
This question is partially out of curiosity and partially a sub-question of my previous question.
Is it possible to rewrite the following script in expect without using the interact function?
eval ...
0
votes
0
answers
36
views
Is it possible for expect to log the `tty` responses to ANSI escape sequences?
Consider the following expect program, designed to log a full terminal interaction:
if { [info exists ::env(RAW_LOG_FILE) ] } {
log_file $::env(RAW_LOG_FILE)
}
eval spawn $argv
interact
When I run ...
0
votes
0
answers
35
views
Expect script truncates output
I wrote a simple expect script to connect to some Cisco Nexus Switch to retrieve the ARP table (running the command show ip arp):
log_user 0
spawn sshpass -p $password ssh -o StrictHostKeyChecking=no -...
0
votes
1
answer
89
views
LaunchAgent refuses to run shell script despite throwing no obvious errors
This question is similar to LaunchAgent doesn't run shell script, but the solutions there didn't work for me as my situation is presumably much more complex.
I have the following Bash script:
#!/...
0
votes
2
answers
77
views
Expect script handling SSH key
I have script for running SSH and it's running well when connected to new SSH version. The problem happens when trying to run the script on old devices which are still using diffie-hellman-group1-sha1....
-4
votes
2
answers
166
views
Need expect regex using character class of (almost) all printable ASCII characters, called from shell
I spent a lot of time on it, and I had asked AI eventually, too, but still I can't get this working:
A program created a set of 16 random printable ASCII characters, and I want expect to check the ...
1
vote
1
answer
107
views
expect regular expression does not work with [yes/NO]
I'm running easyrsa init-pki in bash script, and use expect to auto answer the questions, but the following expect settings are not working as expected:
expect {
-re {Confirm removal:} {send "...
-1
votes
1
answer
51
views
Use match within match expression [duplicate]
I was wondering whether I could use a part of the match within the match expression.
I would need that for automatic program testing, where some random pattern is occurring twice in the output, like ...
0
votes
1
answer
64
views
expect-5.45.4 shows unexpected spawn output, causing string match to fail; is it a bug?
In SLES15 SP6 on x86_64 I'm using a bash script and expect-5.45.4 to do automated program testing.
Basically I'm checking whether the program to test (./pwg.pl) outputs a specific string.
Starting to ...