summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-06-13 11:35:49 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-06-13 11:40:01 (EDT)
commit0ee1882f0d6405481e99cf7d63cfd35e71af0fb6 (patch)
treeb899bc086dfd916ec0cd76baece168d078add3e2 /tools
parent445e3d6e43c55ddeb19322918e016c63f91c1958 (diff)
tools/mtime.sh: Fix ls parsing
The file name (preceeded by whitespace) ended up in the year variable, which isn't quoted when later used as a numeric argument to printf.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mtime.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mtime.sh b/tools/mtime.sh
index 7207f9e..b88b833 100755
--- a/tools/mtime.sh
+++ b/tools/mtime.sh
@@ -31,10 +31,11 @@ get_mtime()
local m=
local d=
local y=
+ local name=
local now_m=
local now_y=
- read -r mode links owner group size m d y <<-EOF
+ read -r mode links owner group size m d y name <<-EOF
$(LC_ALL=POSIX ls -l "${file}")
EOF
case "${m}" in