Shell Scripting
Browse all articles, tutorials, and guides about Shell Scripting
Posts
Ubuntu 26.10 Moves cp, mv and rm to Rust. We Ran 162 Shell Commands Through GNU and uutils to See What Changes
Ubuntu 26.10 ships on October 15 with Rust coreutils for every tool. On the same system, 150 of our 162 shell test cases gave byte-identical results with GNU and uutils. The other 12 come down to four changes that can break a script (GNU detection, cut -c, timeout -s KILL, base64 -d) and five error messages.
How to Sleep for Milliseconds in Bash and Linux
Learn how to pause script execution for fractions of a second using sleep, usleep, and other methods for precise timing in Bash scripts and command-line operations.
What Does set -e Mean in Bash? Shebangs, sh vs bash and the Script Directory
The first lines of a Bash script decide which shell runs it, what happens when a command fails and where it finds its files. Learn what set -euo pipefail does and where it does not stop a script, which shebang to use, how sh differs from bash, and how to get the script directory.
How Does cat << EOF Work in Bash?
Understand heredocs in Bash - the << EOF syntax that lets you write multi-line strings, create files with embedded content, and pass complex input to commands.
How to Prompt for Yes/No/Cancel Input in a Linux Shell Script
Learn different techniques for creating interactive prompts in your shell scripts, from simple yes/no confirmations to three-way choices with proper input validation and user-friendly interfaces.
How to Check if a File, Directory, Variable or Command Exists in Bash
The Bash tests you use in almost every script: check if a directory or file exists, if a variable is set or empty, if a string contains a substring, how to compare text without case, and if a program is installed.