remove shell script for renaming files

This commit is contained in:
Pavel Prichodko 2023-01-23 14:47:22 +01:00
parent 1cf0c8b1e7
commit 89f44e435e
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
1 changed files with 0 additions and 10 deletions

View File

@ -1,10 +0,0 @@
#!/bin/zsh
directory=$1
for file in "$directory"/*; do
filename=$(echo "$file" | tr '[:upper:]' '[:lower:]') # convert to lowercase
filename="${filename// /-}" # replace spaces with dashes
filename="${filename//_/-}" # replace underscores with dashes
mv "$file" "$filename"
done