Skip to content
Dave Rix
  • Home
  • Projects
  • Blog
  • About
  • Contact

Bash

Bash scripting and shell tooling for automation and large-scale data processing.

Command pipelines in Bash: chaining commands and handling errors

2026-06-12 by Dave
Title card for 'Command pipelines in Bash: chaining commands and handling errors'

How to chain commands with Bash pipes, why the default error-handling behaviour is dangerous, and how to fix it with pipefail, PIPESTATUS, and a defensive script header.

Categories Linux & Automation Tags Bash, Linux Leave a comment

The articles here are my own thoughts, based on many years of working with a variety of technologies. I'm not saying these are the best ways of doing various tasks, but they work for me.

This is also a good way for me to remember processes that are only done on occasion, but saves having to Google and draw from various sources if they are all here in one place!

Recent Posts

  • Dissecting a running Linux instance to build a Packer configuration
  • Docker and Multipass MySQL test environments for upgrade and tuning practice
  • Command pipelines in Bash: chaining commands and handling errors
  • Deriving unique server IDs from IP addresses
  • Case study: Modernising an AWS estate with Claude Code

Archives

  • June 2026

Categories

  • AWS & Cloud Architecture
  • Databases
  • Linux & Automation
  • Projects
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy
  • Twitter/X
  • LinkedIn
© 2026 Dave Rix • Built with GeneratePress