-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript_template.sh
More file actions
46 lines (40 loc) · 1.07 KB
/
script_template.sh
File metadata and controls
46 lines (40 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/zsh
#
# Script Name: <script_name>.sh
# Description: <short description of what this script does>
# Author: Your Name
# Created: <YYYY-MM-DD>
# Version: 1.0
#
# Usage:
# <script_name>.sh [options]
#
# Notes:
# - Designed for macOS with zsh
# - Place this script in ~/.local/bin and make it executable
#
########################################
# Safety settings
########################################
set -euo pipefail
IFS=$'\n\t'
########################################
# Logging helpers
########################################
log_info() { echo "ℹ️ [INFO] $*"; }
log_success() { echo "✅ [SUCCESS] $*"; }
log_warn() { echo "⚠️ [WARNING] $*"; }
log_error() { echo "❌ [ERROR] $*" >&2; }
########################################
# Main script logic
########################################
main() {
log_info "Starting <script_name>..."
# === Your code here ===
echo "Hello from <script_name>!"
log_success "<script_name> completed."
}
########################################
# Run main
########################################
main "$@"