Skip to content

Instantly share code, notes, and snippets.

@hernanflores
Created January 9, 2012 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hernanflores/1583687 to your computer and use it in GitHub Desktop.
Save hernanflores/1583687 to your computer and use it in GitHub Desktop.
Comandos remotos memcached
#!/bin/sh
host=localhost
port=11211
cmd="delete $1"
echo "about to exec: $cmd"
( echo open ${host} ${port}
sleep 1
#echo -e "\r"
#sleep 1
echo $cmd
#sleep 1
#echo -e "\r"
sleep 5
echo exit ) | telnet
echo "end remove_key"
@hernanflores
Copy link
Author

Lo importante acá es el manejo del telnet de manera no interactiva.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment