File: teeworlds_datetime.sh

package info (click to toggle)
teeworlds 0.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 16,056 kB
  • sloc: cpp: 58,010; ansic: 14,468; python: 3,763; asm: 946; objc: 107; makefile: 37; xml: 21; sh: 7
file content (6 lines) | stat: -rwxr-xr-x 258 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
#!/bin/sh
# Helper script to show timestamps in log files that can be parsed by tools
# like fail2ban. Requires the installation of gawk.
set -e

exec /usr/bin/gawk 'BEGIN { FS="]"; OFS=FS } /^\[.*\]/ { $1="["strftime("%F %T", systime()); print; fflush() }'