06-08, 13:00–13:50 (EST5EDT), System76 (BallroomA)
One seldom sets out to write a 500-line bash script, but they can grow that large over time. As a follow-up to my previous bulletproof bash talks, I'd like to share some tips, idioms, and tools to help cope with scripts of any size.
Topics:
* Safer than subshells: using pass by reference
* Optional checks in shellcheck
* Logging a partial trace for implicit errors
* Simple concurrency using sleep, kill -s 0, and wait -n
* Tools
** debugger with single-stepping and breakpoints
** code coverage through kcov
** code complexity
* Writing unit tests (yes, really!)
Quick reference: https://aka.ms/bash4thewin
I live in Georgia with my wife and four children. I work in the Linux Systems Group at Microsoft. Other places I've worked include AWS and Secureworks. My career started in the days of uucp, thinnet, and SunOS 4. I enjoy the history of computing, regex, and array languages.