diff options
-rwxr-xr-x | send-refresh.sh | 11 |
1 files changed, 9 insertions, 2 deletions
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 |