From 36509ea4af2beabe7e8691cceb1c8504df340a34 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 13 Sep 2016 10:33:40 +0100 Subject: [PATCH] epoch2date --- etc/profile.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index 5ab9ec46..77df31e3 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -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() { -- 2.47.3