aboutsummaryrefslogtreecommitdiff
path: root/send-refresh.sh
diff options
context:
space:
mode:
authorSanJacobs2022-10-08 17:52:20 +0200
committerSanJacobs2022-10-08 17:52:20 +0200
commit91b92bd53845111852318093aa793273dc3a04e9 (patch)
treeabcc2e468b1056a14d64daefdfe5455c6af039b0 /send-refresh.sh
parenta528a3eb7cfa972eb90162274bdab1801d7f9c96 (diff)
downloadsend-91b92bd53845111852318093aa793273dc3a04e9.tar.gz
send-91b92bd53845111852318093aa793273dc3a04e9.tar.bz2
send-91b92bd53845111852318093aa793273dc3a04e9.zip
Getting some file info
Diffstat (limited to 'send-refresh.sh')
-rwxr-xr-xsend-refresh.sh11
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