Month: December 2004
-
Shell Script: Find the Script’s Own Directory
A script’s current working directory and the directory containing the script are different concepts. pwd reports where the caller is working; it does not reliably report where the script file lives. Bash: directory containing the script #!/usr/bin/env bash set -euo pipefail SCRIPT_DIR=”$( cd — “$(dirname — “${BASH_SOURCE[0]}”)” >/dev/null 2>&1 pwd -P )” printf ‘Script directory:…
-
SQL Server Performance Hardware Checklist
Choose SQL Server hardware from measured workload requirements, not a generic rule such as “buy the most CPUs possible.” Licensing, NUMA topology, storage latency, memory pressure, virtualization, and growth can matter more than a single headline specification. 1. Establish the workload Peak and typical transactions, batch duration, concurrent sessions, and data growth Read/write mix, working-set…
