Print timestamped log lines.
Section: Logging and Output
Simple log function
bash
bash
log() { printf '[%s] %s\n' "$(date +%H:%M:%S)" "$*"; }Explanation
Small helper that makes scripts easier to debug.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Logging and Output