Skip to content

Instantly share code, notes, and snippets.

View ruslo's full-sized avatar

Ruslan Baratov ruslo

  • Bali
  • 16:06 (UTC +08:00)
View GitHub Profile
@ruslo
ruslo / bash_script.sh
Created February 5, 2024 12:17
Template bash script file
#!/bin/bash
# Exit immediately if command returns a non-zero status.
# Do not move it to shebang since it will be ignored
# if run by "/bin/bash ./bash_script.sh"
set -e
# No arguments are expected, so exit with an error if anything is provided
# https://unix.stackexchange.com/a/25947
if [ ! $# -eq 0 ];