function nba-timestamp2date() {
if "x"== "x$1"; then
1=time
fi
perl -le "print scalar localtime $1";
}
Comment ça je suis un gros fainéant ? D'accord le nom de la fonction est aussi long que l'appel a la commande finale, mais au moins, zsh me le complète :)
Exemple :
% nba-timestamp2date Tue Aug 10 12:27:04 2004 % nba-timestamp2date 1091940610 Sun Aug 8 06:50:10 2004
Quand on est paresseux, on l'est juqu'au bout ! (c)