On 2021/05/01 03:28, Carlos E. R. wrote:
If that looks interesting, we can concoct a script.
Here's part of the script. Feed the date part of the filename to the cnvtim function and it should give you a better format for sequencing the logs:
/tmp/dtcnv "Fri-Apr-30-185859-PDT-2021" 20210430-185859.log
#!/bin/bash -u # vim=:SetNumberAndWidth shopt -s expand_aliases alias my='declare ' int='my -i ' array='my -a ' map='my -A ' # For more full aliases et al, use .shh setx() { trap unsetx EXIT; set -x; } ; unsetx() { set +x;} ################################################################################ #setx array monams=(jan feb mar apr may jun jul aug sep oct nov dec) int ctr=1 my -l v map movals=() for v in ${monams[@]}; do int val=ctr movals[$v]=$val ctr+=1 done cnvtim() { my dt=${1:?} my -l mo (export IFS=-; read dn mo da t tz yr<<<"$dt" int h=${t:0:2} int m=${t:2:2} int s=${t:4:2} printf "%04d%02d%02d-%02d%02d%02d.log\n" $yr ${movals[$mo]} $da $h $m $s ) } cnvtim "$@" # vim: ts=2 sw=2