#!/bin/sh
#
# Copyright © 1988-2004 Keith Packard and Bart Massey.
# All Rights Reserved. See the file COPYING in this directory
# for licensing information.
#
date |
gawk '
BEGIN {
monthnum["Jan"] = 1
monthnum["Feb"] = 2
monthnum["Mar"] = 3
monthnum["Apr"] = 4
monthnum["May"] = 5
monthnum["Jun"] = 6
monthnum["Jul"] = 7
monthnum["Aug"] = 8
monthnum["Sep"] = 9
monthnum["Oct"] = 10
monthnum["Nov"] = 11
monthnum["Dec"] = 12
}
{
printf "%04d/%02d/%02d\n", $6, monthnum[$2], $3;
}'
syntax highlighted by Code2HTML, v. 0.9.1