From ada92527301e63e412c67530ae20822adb4aa561 Mon Sep 17 00:00:00 2001 From: Vadim Zhukov Date: Thu, 19 Jul 2018 16:48:50 +0300 Subject: [PATCH] ls -T isn't portable as well, as pointed out by pickfire@. Since we don't really use timestamp for anything except direct display, just extract fields 6-8 from "ls -l" output and be done with it. --- share/cht.sh.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/cht.sh.txt b/share/cht.sh.txt index a7dcb89..86afd70 100755 --- a/share/cht.sh.txt +++ b/share/cht.sh.txt @@ -405,7 +405,7 @@ EOF continue ;; version) - insttime=$(ls -lT -- "$0" | sed 's/ / /g' | cut -d ' ' -f 6-9) + insttime=$(ls -l -- "$0" | sed 's/ */ /g' | cut -d ' ' -f 6-8) echo "cht.sh version $__CHTSH_VERSION of $__CHTSH_DATETIME; installed at: $insttime" TMP2=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX) if curl -s https://cht.sh/:cht.sh > "$TMP2"; then