From 10aad838bf6aaa6fdab5bff6d0d194862355e7f2 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 20 Nov 2024 11:25:32 +0200 Subject: [PATCH] fix path --- fix_dir_dates.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix_dir_dates.sh b/fix_dir_dates.sh index 4321446..9bf5383 100755 --- a/fix_dir_dates.sh +++ b/fix_dir_dates.sh @@ -2,7 +2,7 @@ while read -r dir do echo "Checking dir '${dir}'..." - last_file=$(ls -ht -- "${dir}" | head -n1) + last_file="${dir}/$(ls -ht -- "${dir}" | head -n1)" echo "Last modified file is '${last_file}'" last_file_time=$(stat -c %Y -- "${last_file}") echo "Last modification time of the file is '${last_file_time}'"