Loading...
Loading...
Compare original and translation side by side
bash-probash-defensive-patternsbash-probash-defensive-patternsUse @bash-pro to design production-ready bash scriptUse @bash-pro to design production-ready bash scriptbash-probash-defensive-patternsbash-probash-defensive-patternsUse @bash-defensive-patterns to implement strict mode and error handlingUse @bash-defensive-patterns to implement strict mode and error handlingbash-linuxlinux-shell-scriptingbash-linuxlinux-shell-scriptingUse @bash-linux to implement system commandsUse @bash-linux to implement system commandsbash-defensive-patternserror-handling-patternsbash-defensive-patternserror-handling-patternsUse @bash-defensive-patterns to add comprehensive error handlingUse @bash-defensive-patterns to add comprehensive error handlingbash-probash-proUse @bash-pro to implement structured loggingUse @bash-pro to implement structured loggingbats-testing-patternsshellcheck-configurationbats-testing-patternsshellcheck-configurationUse @bats-testing-patterns to write script testsUse @shellcheck-configuration to lint bash scriptUse @bats-testing-patterns to write script testsUse @shellcheck-configuration to lint bash scriptdocumentation-templatesdocumentation-templatesUse @documentation-templates to document bash scriptUse @documentation-templates to document bash script#!/usr/bin/env bash
set -euo pipefail
readonly SCRIPT_NAME=$(basename "$0")
readonly SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"; }
error() { log "ERROR: $*" >&2; exit 1; }
usage() { cat <<EOF
Usage: $SCRIPT_NAME [OPTIONS]
Options:
-h, --help Show help
-v, --verbose Verbose output
EOF
}
main() {
log "Script started"
# Implementation
log "Script completed"
}
main "$@"#!/usr/bin/env bash
set -euo pipefail
readonly SCRIPT_NAME=$(basename "$0")
readonly SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*"; }
error() { log "ERROR: $*" >&2; exit 1; }
usage() { cat <<EOF
Usage: $SCRIPT_NAME [OPTIONS]
Options:
-h, --help Show help
-v, --verbose Verbose output
EOF
}
main() {
log "Script started"
# Implementation
log "Script completed"
}
main "$@"os-scriptinglinux-troubleshootingcloud-devopsos-scriptinglinux-troubleshootingcloud-devops