Today I discovered a nifty way to do socket programming in bash without the need for netcat (nc) or telnet: /dev/tcp. Say you want to connect to Google and fetch their front page. Just do this: exec 3/dev/tcp/www.google.com/80 echo -e “GET / HTTP/1.1\n\n” >&3 cat