4 ms·
Another fun way to test connectivity in pure bash (need a revision from the past 15 years) is timeout 5 bash -c 'cat < /dev/null > /dev/tcp/google.com/80'
by oso2k 1y ago
Another fun way to test connectivity in pure bash (need a revision from the past 15 years) is
timeout 5 bash -c 'cat < /dev/null > /dev/tcp/google.com/80'
Replace google.com and port 80 with your web or tcp server (ssh too!). The command will error/time out if there isn’t a server listening or you have some firewall/proxy in the way.
- halJordan 1y agoTimeout is an external program to bash