shsocket - shell socket shsocket is a small utility which connects to a service and then spawns a child process with stdin/stdout redirected. Eg:
shsocket localhost pop-3 pollmbox.sh

pollmbox.sh:
  #!/bin/sh
  echo "user floffy^M"
  read code x
  echo "pass furry^M"
  read code x
  #additional POP-3 commands here...
  echo "quit^M"
  read code x
  exit 0
Download source here(2KB)