TIL: Make HTTP Requests Without curl Using Bash /dev/TCP
Hacker News (AI keywords)·2 days ago·Tutorial
A developer shares a lesser-known Bash capability: the /dev/tcp virtual filesystem, which opens raw TCP connections using only shell built-ins. By writing HTTP headers to a file descriptor and reading the response back, you can fetch web resources without curl, wget, or any installed HTTP client. This technique is especially valuable in minimal containers, restricted shells, or embedded environments where external binaries may not exist.