Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. richwd

    Need Help with Expect matching

    expect: does "if [[ $FILE =~ ^[A-F0-9]{32}[.][A-F0-9]{8}[.]jpg$ ]]; then\n> " (spawn_id exp6) match glob pattern "if [[ $FILE =~ ^[A-F0-9]{32}[.][A-F0-9]{8}[.]jpg$ ]]; then\n> "? no expect: timed out Why can't I match any if commands? What's so different about them? Every line I have with if...
  2. richwd

    Strange \n newlines in input buffer

    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...
  3. richwd

    Need Help with Expect matching

    Also tried with one square bracket: expect: does " if [ -d emptyfolder1319668531 ]\n> " (spawn_id exp4) match glob pattern " if [ -d emptyfolder1319668531 ]\n> "? no expect: timed out
  4. richwd

    Need Help with Expect matching

    Tried again without the quotes but still fails. expect: does " if [[ -d emptyfolder1319666737 ]]\n> " (spawn_id exp4) match glob pattern " if [[ -d emptyfolder1319666737 ]]\n> "? no expect: timed out
  5. richwd

    Need Help with Expect matching

    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...
  6. richwd

    How to stop a running Tcl procedure

    Thanks, I did something similar with a boolean variable and having the procedure check it like you did but you can't break out of it until you get to a point where you can check the variable right? Instead of doing a "puts" it may be a procedure processing lots of files in a directory and I...
  7. richwd

    How to stop a running Tcl procedure

    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...
  8. richwd

    Expect inserting "?"s question marks in send stream

    I'm not sure where I got this, maybe I downloaded it or maybe someone gave me a copy but this is what I'm using: SSHSecureShellClient-3.2.9 on Windows. The Linux box has: OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8m. Expect 5.43.2 Tcl 8.5 # stty -a speed 38400 baud; rows 25; columns 80; line = 0...
  9. richwd

    Expect inserting "?"s question marks in send stream

    Sending machine is: Host Name: WDMV-QA-TEST-PC OS Name: Microsoft Windows 7 Professional OS Version: 6.1.7601 Service Pack 1 Build 7601 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build...
  10. richwd

    Expect inserting "?"s question marks in send stream

    My program is working fine. I just want to know why Expect is sticking question marks in my code and how to stop it. It's REALLY annoying.
  11. richwd

    Expect inserting "?"s question marks in send stream

    Ok, I'd like to try that but isn't it going to prompt me for password every time I send an ssh command? I know what you're going to say, set up passwordless authentication with keys. That would be good for one time but I may have to test many machines at work and don't want to have to go thru...
  12. richwd

    Expect inserting "?"s question marks in send stream

    Hmm... Interesting. But why do all the examples I find talk about spawning ssh? And why no exit at the end? Does the connection just end after the last brace? Are you saying don't use Expect at all? Then how do I get output back? So confusing.
  13. richwd

    Expect inserting "?"s question marks in send stream

    I still don't follow. This is what I'm doing in a nutshell: spawn ssh2.exe yourLinuxBox proc1 proc2 proc3 . . . #Then when you're done close the session. exp_send "exit\r" exp_close exp_wait Are you saying I should instead do: ssh yourLinuxBox proc1 ssh yourLinuxBox proc2 ssh...
  14. richwd

    Expect inserting "?"s question marks in send stream

    What really pisses me off is that Expect is hacking my code and inserting characters without telling me. I spent a lot of time looking thru my code trying to find my bug why my program wasn't working and it wasn't my code at all. It was Expect inserting questions marks. Now I can't write a...
  15. richwd

    Expect inserting "?"s question marks in send stream

    Because I have to do a lot more things. Don't you open a connection to ssh, do a bunch of things then close the connection? Or do I prepend "ssh2" before every command I send? It's a bigger program than just one command.
  16. richwd

    Expect inserting "?"s question marks in send stream

    What do you mean? I am. I spawn ssh then send these commands. This is just a snippet not the whole program. Yes I can ssh to it and look manually but I'm trying to automate it.
  17. richwd

    Expect inserting "?"s question marks in send stream

    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...

Part and Inventory Search

Back
Top