How to open TCP/UDP sockets using a built-in feature in Bash ? Bash shell has a built-in feature that allows to open TCP/UDP sockets using a simple syntax. This is very useful when tools like netcat are not installed or we don’t have the permission to use it. The syntax is $ exec {file-descriptor}<>/dev/{protocol}/{host}/{port} {file-descriptor} – 0, 1 and 2 are seserved for stdin, stout and stderr respectively. At least 3 must be used. The Bash manual suggest to be careful in using descriptors above 9 since there could be conflict with descriptors used internally by the shell. <> – the file is open for both reading and writing {protocol} – TCP or UDP {host} – ip address or domain name of the host {port} – logic port Sockets can be closed using $ exec {file-descriptor}<>&- To send a message through the socket echo -e -n "$MSG_OUT" >&3 or printf "$MSG_OUT" >&3 To read a message from the socket read -r -u -n $MSG_IN <...