From f35b07766cccf049c32ffa25b001b795aa62ca61 Mon Sep 17 00:00:00 2001 From: Heavy Date: Mon, 28 Jun 2021 12:47:32 +0200 Subject: [PATCH] Added new function: epoch2date. --- dot_bashrc.d/executable_09.functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dot_bashrc.d/executable_09.functions b/dot_bashrc.d/executable_09.functions index 0fafd11..3df3de7 100755 --- a/dot_bashrc.d/executable_09.functions +++ b/dot_bashrc.d/executable_09.functions @@ -44,4 +44,12 @@ extract() { esac } +# Misc functions + +# convert epoch timestamp to human readable date +epoch2date() { + local string="${1:-0}" + date -d "@$string" +} + PATH=$PATH:$HOME/bin