commit: 8f39a78e6914008614f70ab13e8377116c33f48b
parent: af601ce2fc72033b2885329e3af45112d48c4608
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 4 Aug 2020 02:58:51 +0200
.common.sh: log_cmd wrapper function
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/.common.sh b/.common.sh
@@ -131,6 +131,12 @@ wat_unicode() {
awk -F\; '{ if($1 == "'${1}'"){print "U+"$1 FS $2} }' /usr/share/unicode-data/UnicodeData.txt
}
+log_cmd() {
+ echo "$(date -u '+%FT%TZ') START $@" >> $HOME/.log_cmd_"$1".log
+ "$@"
+ echo "$(date -u '+%FT%TZ') EXITED[$?] $@" >> $HOME/.log_cmd_"$1".log
+}
+
# startup
stty sane # I can haz urandom