Posted to tcl by dodobrain at Thu Jun 13 05:31:51 GMT 2019view pretty
#!/usr/bin/expect set timeout 4 spawn nc -q 2 127.0.0.1 8888 send "get 123456\r" expect { timeout { exit 1 } "VALUE 123456*\n\{\"number\":\"123456\"*\}*\nEND" } send "quit\r"
#!/usr/bin/expect set timeout 4 spawn nc -q 2 127.0.0.1 8888 send "get 123456\r" expect { timeout { exit 1 } "VALUE 123456*\n\{\"number\":\"123456\"*\}*\nEND" } send "quit\r"