Topic

Shell

Explore shell scripting, terminal automation, and command-line productivity. Our digest summarizes configuration management, script libraries, and shell tools from Hacker News and Lobsters.

What this topic tracks

  • Developer tool releases and ecosystem updates
  • Workflow automation and productivity practices
  • Practical setup, debugging, and integration lessons

Shell · 51 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

11 stories

Forgejo 16.0.4 has a critical security bug fix (RCE - Remote Code Execution)

codeberg.org · 10 Sept

Git · Shell · Terminal

The text is a fragmented collection of Git documentation and shell snippets.

It references repository maintenance, worktrees, fetch and rebase behavior, shallow history via `--depth`, commit-graph generation, upload-pack services, encoding, compression, detached HEADs, and command-line formatting options. It appears to be extracted from Git manuals rather than presenting a coherent procedure.

landdown - Simple sandboxing for shell scripts

git.sr.ht · 2 Apr

Cybersecurity · Linux · Shell

Landdown is a Linux utility that sandboxes shell scripts using Landlock, protecting systems from malicious activity.

By defining explicit allowlists for file and network access within a script's shebang, users can restrict operational permissions. It requires rules for read/write access and network connectivity to execute scripts securely, effectively minimizing potential security impacts from bugs.

Brat, a parallel TAP testing harness for the POSIX shell

codeberg.org · 20 Feb

Linux · Shell · Testing

Brat is a lightweight, brutalist parallel TAP testing harness for POSIX shell.

Written in shell and awk with zero dependencies, it targets the POSIX.1-2024 standard. It features a simple syntax, parallel execution, and a small codebase designed for direct embedding into projects, serving as a portable successor to Bats.

Easily write Bash with a transpiler

fosdem.org · 1 Feb

Linux · Shell · Terminal

Amber Lang is an experimental programming language designed to streamline the creation of shell scripts by transpiling directly into Bash.

While Bash is the industry standard for automation, its often cryptic syntax and lack of robust error handling can lead to maintenance challenges in complex environments. Amber solves these problems by providing a modern, readable syntax inspired by contemporary languages, implementing basic typing, and offering structured control flow. Built using Rust, the ecosystem includes professional developer tools like an LSP and editor plugins. Remarkably, Amber maintains high compatibility by generating Bash code that runs on versions ranging from 3.2 to 5.3, allowing developers to leverage modern language features while ensuring their scripts remain portable across various Unix-like systems.

Did you notice the command error exit in the shell?

monzool.net · 10 Apr

Git · Shell · Terminal

The author shares a custom shell script for .zshrc that displays a visual 'GURU MEDITATION ERROR' banner in the terminal whenever a git command fails.

This utility helps developers notice errors more quickly after mistakenly running commands without proper flags, preventing accidental modifications to the wrong branches.

The shortest IPv6 addresses

ache.one · 6 Sept

Shell · Terminal

The author scans the shortest usable global-unicast IPv6 addresses—those formatted X::—as an equivalent to 1.1.1.1, using a fish script and ping.

Of about 8,192 candidates, four responded from a residential network; three more appeared from another network. Responses belonged to organizations including NKN, Cogent, xTom, Van Veen Beheer B.V., and Satsoft CC.

Repeating Ourselves Less with M4

nemin.hu · 31 Aug

Shell · Terminal · Operating Systems

The article demonstrates using OpenBSD’s m4 and sed to generate concise, reusable httpd.conf files.

Parameterized macros eliminate repeated server, TLS, header, redirect, and malicious-route rules, while sed restores commas lost during m4 expansion. The approach supports self-contained VPS administration and illustrates Unix pipelines, though careful handling of macro pitfalls is required.

Brut, the Brutal Router for Unix Tools

brut.sh · 6 Oct

CLI · Shell

Brut is a single-file POSIX shell router that builds portable Unix command-line programs by dispatching arguments to executables named from the program and command.

It configures PATH, searches it with find, and supports shared helpers, error and usage handling, namespaces via symlinks, private executables, hooks, and commands written in other languages. Its bin/lib/libexec/share layout enables independently testable components without runtime dependencies beyond POSIX.1-2024 utilities, while filesystem routing adds measurable invocation overhead.

Handling secrets (somewhat) securely in shells

linus.schreibt.jetzt · 1 Jan

Cybersecurity · Linux · Shell

Handling secrets in an interactive shell requires care to prevent accidental leakage through the process table or shell history.

Standard commands like curl can expose sensitive tokens to tools like ps and pgrep because process command lines are visible in the /proc filesystem on Linux. To mitigate this, users can employ process substitution or read headers from files with restricted permissions. Furthermore, shell history should be protected by using the read command with the -s flag or obtaining secrets from command-line password managers instead of direct assignment. Avoiding exported environment variables is also crucial, as child processes inherit this environment, increasing the surface area for accidental leakage during debugging or logging. While these methods introduce some complexity, they ensure secrets remain in memory and are never written to persistent, unencrypted storage.

Where it came fromLobstersCreate a Snapbyte.dev digest and choose Shell as one of your topics.Build your digest