X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc2;h=6b977839c870f2a4d37c0ae8bc3a3cc31aebe250;hb=d7551546ac323c5d4b49370c885646bcf96e959f;hp=ddfe816e236aff742d1b75e95f6c8c10d400f0ad;hpb=b18dade73dedfe69aa741f8417947d83c4208f2d;p=distro-setup diff --git a/brc2 b/brc2 index ddfe816..6b97783 100644 --- a/brc2 +++ b/brc2 @@ -381,6 +381,22 @@ bigclock() { nnn() { /a/opt/nnn -H "$@"; } +locat() { # log-once cat + local files + ngset + files=(/var/local/cron-errors/* /home/iank/cron-errors/* /sysd-mail-once-state/*) + case ${#files[@]} in + 0) : ;; + 1) + echo ${files[0]} + head ${files[0]} + ;; + *) + head ${files[@]} + ;; + esac + ngreset +} # duplicated somewhat below. jrun() { # journal run. run args, log to journal, tail and grep the journal.