Minor adjust in rename-all-files-to-md5sum.sh

This commit is contained in:
2025-04-27 03:24:43 -03:00
parent 4e493c757c
commit 4c08434cab

View File

@@ -1,6 +1,11 @@
#!/bin/bash #!/bin/bash
mapfile -t files < <(find . -maxdepth 1 -type f) if [ "$(pwd)" == "$HOME" ]; then
echo "Current directory should not be HOME"
exit 1
fi
mapfile -t files < <(find . -maxdepth 1 -type f -not -name 'desktop.ini')
for filename in "${files[@]}"; do for filename in "${files[@]}"; do
filename_m5sum=$(md5sum "$filename" | awk '{print $1}') filename_m5sum=$(md5sum "$filename" | awk '{print $1}')