Hi,
I'm sending a bash command to a linux machine but the input buffer is somehow getting a "\n" inserted into it so I can't match. I can't figure out why and it's driving me crazy. Any ideas where it's comming from? you can see it right after the "img_2".
send: sending "rmdir...
I'm sending some bash commands to run on the Linux command line of the target machine, but I can't figure out why this code fails? Any ideas?
expect: does " if [[ -d "emptyfolder1319665962" ]]\n> " (spawn_id exp4) match glob pattern " if [[ -d "emptyfolder1319665962" ]]\n> "? no
expect...
Let's say I have a Tk GUI app that's running a procedure that takes a long time. Let's also say that I've changed my mind and don't want to wait until this procedure ends. I'd like to have a "Stop" button on my GUI that would accomplish this. Is that possible? I already have a button that quits...
My code snippet:
set send_slow {2 0.5}
set shell_commands {
"for FILE in *.*\r"
"do\r"
"if \[\[ \$FILE =~ ^\[A-Z0-9]{32}\[.]\[A-Z0-9]{8}\[.]jpg$ ]]; then\r"
":\r"
"else\r"
"echo \"Fail: \$FILE\"\r"
"fi\r"
"done\r"
}
#Send the commands, need to use "-s" to slow it down so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.