User Tools

Site Tools


Check a TCP connection and response on raw BASH

Sometimes you don't have the proper tools to check connectivity to a site (curl, nc, ping) but you have a bash shell, so you can use bash built-in functions to do this.

exec 3<>/dev/tcp/ && echo -ne 'GET /index.html\n\n' >&3 && cat <&3 2>/dev/null
docu/csheet/sysadm/script/bash/tcp_raw_bash.txt · Last modified: 2020/02/19 14:38 by admin