]> git.nbdom.net Git - nb.git/commitdiff
epoch2date
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Tue, 13 Sep 2016 09:33:40 +0000 (10:33 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Tue, 13 Sep 2016 09:33:40 +0000 (10:33 +0100)
etc/profile.d/functions

index 5ab9ec46f51b2c3fbd9bd1a782c3288e6782955b..77df31e3c845610ae4139d911a4518ba3b93fa97 100644 (file)
@@ -601,7 +601,7 @@ function ls_users() {
 }
 
 function reverse() { perl -e 'print reverse <>'; } 
-function epoch2date() { perl -M'POSIX strftime' -e 'e2d($ARGV[0]) and exit if @ARGV; while(<>){e2d($_)}; sub e2d(){local $_=shift;s/^(\d+)/strftime("%Y-%m-%d %H:%M:%S",localtime($1))/e; print $_}' $@; }
+function epoch2date() { perl -M'POSIX strftime' -e 'e2d($ARGV[0]) and print "\n" and exit if @ARGV; while(<>){e2d($_)}; sub e2d(){local $_=shift;s/^(\d+)/strftime("%Y-%m-%d %H:%M:%S",localtime($1))/e; print $_}' $@; }
 #function epoch2date() { perl -M'POSIX strftime' -e 'e2d while<>; sub e2d(){local $_=shift;s/^(\d+)/strftime("%Y-%m-%d %H:%M:%S",localtime($1))/e; print $_}' $@; }
 
 find_sort_mtime() {