X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=check-subvol-stale;h=a3d0149e24fa574ccec2d62a5e427db81935851e;hp=3d649886c39bbe283d9cd17446793a5130fd19ac;hb=7b47d6a266340223e78317cfe0570868f45a4cad;hpb=12cab163424e3a7b0815646d1d4407f9b5839bcb diff --git a/check-subvol-stale b/check-subvol-stale index 3d64988..a3d0149 100644 --- a/check-subvol-stale +++ b/check-subvol-stale @@ -172,7 +172,7 @@ for d; do for s in ${snaps[@]}; do f=${s##*/} unix_time=$(date -d $(sed -r 's/(.{4})(..)(.{5})(..)(.*)/\1-\2-\3:\4:\5/' <<<${f#$vol.}) +%s) - printf "%s %s\n" $unix_time $s + printf "%s %s\n" $unix_time $s # part of the pipeline # sort will fail done | sort -r | head -n 1 | awk '{print $2}' || [[ ${PIPESTATUS[1]} == 141 || ${PIPESTATUS[0]} == 32 ]] )