------------------------------------------------------------------------------- Using TCP/IP networking in shells ------------------------------------------------------------------------------- Networking (Bash) Bash can open network connections! # Make connection exec 4<>/dev/tcp/www.griffith.edu.au/80 # Send request printf >&4 "%s\n" "HEAD http://www.griffith.edu.au/ HTTP/1.0" printf >&4 "\n" # parse XML file returned while read line; do echo $line done <&4 # close exec 4>&- ------------------------------------------------------------------------------- Other tools nc a cat program for the network ("netcat") tcputils utilities to send/recieve tcp network connetions includes a "getpeername" program. ssh Just run commands on another host or forward connections socat A bi-directional relay client (netcat at ends, socat in middle) -------------------------------------------------------------------------------