dot

packages and services management
Log | Files | Refs | README

commit e0c68400d17b3fa8e80f148b63bb257dbbc1d1ba
parent 6b9d078ebf8cbc5d8a59115f4a480c2008e515b2
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 18 May 2017 23:53:12 +0200

hopefully fixing ii-log

Diffstat:
Mbin/ii-log | 15++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/bin/ii-log b/bin/ii-log @@ -4,15 +4,12 @@ find "${IRC:-$HOME/irc}" -name out -type f | xargs awk -v today=`date +%Y-%m-%d` ' -LASTNAME && FILENAME != LASTNAME { - printf("%s", out) > LASTNAME; - out = ""; -} - FILENAME ~ /out$/ { LASTNAME = FILENAME; - sub(/out$/, "", FILENAME); - FILENAME = FILENAME; + sub("out$", "", FILENAME); + + if (LASTNAME) printf("%s", out) > LASTNAME; + out = ""; } $1 == today { @@ -24,8 +21,8 @@ $1 != today && $1 { sub(/^[^ ]* /, ""); - while (sub(/\002/, "\033[1m")) - sub(/\002/, "\033[m"); + while (sub("\002", "\033[1m")) + sub("\002", "\033[m"); print >> FILENAME date; }