118099Spst#! /bin/sh 218099Spst 318099Spst# Print the modification date of $1 `nicely'. 418099Spst 518099Spst# Don't want foreign dates. 618099Spst 718099SpstLANGUAGE= 873349SruLC_ALL=C; export LC_ALL 918099Spst 1018099Spst 1118099Spst(date; 1218099Spstif ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi 1318099Spst) | awk ' 1418099SpstBEGIN { 1518099Spst full["Jan"] = "January"; number["Jan"] = 1; 1618099Spst full["Feb"] = "February"; number["Feb"] = 2; 1718099Spst full["Mar"] = "March"; number["Mar"] = 3; 1818099Spst full["Apr"] = "April"; number["Apr"] = 4; 1918099Spst full["May"] = "May"; number["May"] = 5; 2018099Spst full["Jun"] = "June"; number["Jun"] = 6; 2118099Spst full["Jul"] = "July"; number["Jul"] = 7; 2218099Spst full["Aug"] = "August"; number["Aug"] = 8; 2318099Spst full["Sep"] = "September"; number["Sep"] = 9; 2418099Spst full["Oct"] = "October"; number["Oct"] = 10; 2518099Spst full["Nov"] = "November"; number["Nov"] = 11; 2618099Spst full["Dec"] = "December"; number["Dec"] = 12; 2718099Spst} 2818099Spst 2918099SpstNR == 1 { 3018099Spst month = $2; 3118099Spst year = $NF; 3218099Spst} 3318099Spst 3418099SpstNR == 2 { 3518099Spst if ($(NF-1) ~ /:/) { 3618099Spst if (number[$(NF-3)] > number[month]) 3718099Spst year--; 3818099Spst } 3918099Spst else 4018099Spst year = $(NF-1); 4118099Spst print $(NF-2), full[$(NF-3)], year 4218099Spst}' 43