dotfiles/bin/prettify_bash_history.awk

10 lines
209 B
Awk
Raw Normal View History

2023-12-23 20:13:47 -07:00
#!/usr/bin/env -S awk -f
# Translate the unix-timestamps in bash history to dates. Requires gnu `date`
{
if ($0 ~ /^#[0-9]+$/)
system("date -d @" substr($0, 2));
else
print " "$0
}