---
title: Good Shell Patterns
osem_url: https://osem.seagl.org/conferences/seagl2021/program/proposals/839
beginning: '2021-11-05T15:30:00.000-07:00'
end: '2021-11-05T16:00:00.000-07:00'
resources:
  internet_archive_identifier: SeaGL2021-Bri_Hatch-Good_Shell_Patterns
  slides_url: https://www.ifokr.org/bri/presentations/seagl-2021-good-shell-patterns/
presenters:
- name: Bri Hatch
  affiliation: ExtraHop Networks
  osem_url: https://osem.seagl.org/users/68
  gravatar_id: e22b6ff68fa96ae5b60c4ad7f15ad77f
  biography: Bri Hatch is Director of IT at ExtraHop Networks, and Chief Hacker at
    Onsight, Inc. An adamant Open Source advocate and security buff, Bri is the author
    of Hacking Linux Exposed, Building Linux VPNs, and numerous online articles on
    the topics of Linux, security, and coding. He has been securing and breaking into
    systems since before he traded in his Apple II+ for his first Unix system.
---

We'll discuss tried-and-true code snippets you can use to make your code more reliable, easier to read, and quicker to debug. Enjoy the elegance of `cd $(dirname $0)`, performing actions only on successful exit, and informational help messages. We'll cover all those minor changes that continually come up in our code review sessions that reap outsized rewards.
