#!/bin/bash
# show embedded utc sec with readable date after.
# allows usual ls options, but may annoy a bit with ls -l.
# awk notes:
    # Regex: Look for first 10 digits that are either at the start/end
    # of the string or separated by non-digit characters.
# append date formatted to line, separated by a tab

/usr/bin/ls -1 $* | \
awk '{ regex = "(^|[^0-9])([0-9]{10})($|[^0-9])"; if (match($0, regex, groups)) { iso_date = strftime("\t%Y-%m-%d:%H:%M:%S:%z", groups[2]); all = $0; $0 = all iso_date;};print $0;}'
