Category

Bash

The pure Bash function library (PHP-style helpers written in Bash) and practical shell scripting techniques.

28 articles, page 2 of 3

Bash

strlen() in Bash: Get the Length of a String

Bash's ${#var} counts characters, PHP's strlen() counts bytes. A clean strlen() function, a strbytes() companion, and the locale traps in between.

6 min read, updated 17 Oct 2026

Bash

yesno() in Bash: Ask a Yes/No Question Safely

A yes/no confirmation prompt for Bash scripts that accepts any case, has an optional default and handles cron, pipes and EOF without looping forever.

6 min read, updated 17 Oct 2026