Skip to content

Instantly share code, notes, and snippets.

View phuongleeo's full-sized avatar
🏠
Working from home

M3trixL330 phuongleeo

🏠
Working from home
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active June 1, 2024 08:46
set -e, -u, -o, -x pipefail explanation
# Bash best practices and style-guide
Just simple methods to keep the code clean.
Inspired by [progrium/bashstyle](https://github.com/progrium/bashstyle) and [Kfir Lavi post](http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/).
## Quick big rules
* All code goes in a function
* Always double quote variables