Minor adjust in rename-all-files-to-md5sum.sh
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
#!/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
|
||||
filename_m5sum=$(md5sum "$filename" | awk '{print $1}')
|
||||
|
||||
Reference in New Issue
Block a user