Tag

Bash

2 stories

A blog engine in one 1,200-line bash script, and the thread can't agree if that's craft or madness (github.com)

Bashblog generates a full static blog, RSS, tags and backups from one ~1,200-line Bash script that leans only on standard Unix tools. No runtime to install, no database. It has 1.9k GitHub stars.

The objection was blunt: one engineer said there's zero advantage to bash past a few lines, with editor syntax highlighting breaking across the file. The counter came from someone who runs web servers in 128MB of RAM, where pulling in Python or Node is exactly the cost you're trying to avoid.

Not just a headline — the discussion unpacked

The top HN threads: facts from the discussions, both sides, insider voices. Email, Telegram, or RSS.

Bash can open a TCP socket and fake an HTTP request without curl (mareksuppa.com)

The trick is three lines: open file descriptor 3 on /dev/tcp, printf a raw GET with CRLF headers, then cat the descriptor back. The Connection: close header is load-bearing — drop it and cat waits forever.

But the loudest reply in the thread was a correction: Bash does not speak HTTP. It opens a socket and you speak HTTP, badly. The toy client doesn't parse responses and breaks on redirects, chunking, or TLS.

🚀Tech ★ 271 · 💬 144 · Jun 17 · #dev tools#programming#security#Bash#curl#Docker+1