I need to sort a file using shell sort in linux. The sort needs to be based on timestamp values contained within each of file\'s rows. The timestamps are of irregular format
The linux date
command does a fine job of parsing dates like this, and it can translate them into more sortable things, like simple unix-time integers.
Example:
cat file | while read line; do
datestring=$(sed -e 's/^.* t="\([^"]*\)".*$/\1/' <<<"$line")
echo "$(date -d "$datestring" +%s) $line"
done | sort -n
then you could pass that through the appropriate cut
invocation if you want that unix timestamp removed again.