summaryrefslogtreecommitdiffstats
path: root/tools/mtime.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mtime.sh')
-rwxr-xr-xtools/mtime.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/mtime.sh b/tools/mtime.sh
index c2f9dfa..7207f9e 100755
--- a/tools/mtime.sh
+++ b/tools/mtime.sh
@@ -23,14 +23,19 @@ get_mtime()
{
local file="${1}"
shift 1
+ local mode=
+ local links=
+ local owner=
+ local group=
+ local size=
local m=
local d=
local y=
local now_m=
local now_y=
- read m d y <<-EOF
- $(LC_ALL=POSIX ls -l "${file}" | cut -d ' ' -f 6-8)
+ read -r mode links owner group size m d y <<-EOF
+ $(LC_ALL=POSIX ls -l "${file}")
EOF
case "${m}" in
'Jan') m=1;; 'Feb') m=2;; 'Mar') m=3;; 'Apr') m=4;;