From 91b92bd53845111852318093aa793273dc3a04e9 Mon Sep 17 00:00:00 2001 From: SanJacobs Date: Sat, 8 Oct 2022 17:52:20 +0200 Subject: Getting some file info --- send-refresh.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'send-refresh.sh') diff --git a/send-refresh.sh b/send-refresh.sh index aedcdee..388571c 100755 --- a/send-refresh.sh +++ b/send-refresh.sh @@ -14,6 +14,8 @@ # Creating an array of homedirectory files younger than 14 days: +webdir="/path/to/public/webdir/" + young_files=() while IFS= read -r -d $'\0'; do @@ -23,7 +25,12 @@ done < <(find /home/san/ -mindepth 1 -maxdepth 1 -type f -ctime -14 -name "*.zip # Looping over said array: for file in "${young_files[@]}"; do - echo "$file" - echo "$(basename "$file")" + filename=$(basename "$file") + checksum=$(md5sum "$file" | awk '{print $1;}') + + echo "file: $file" + echo "filename: $filename" + echo "checksum: $checksum" + done -- cgit v1.2.1