wakuconnect-chat-sdk/lowercase.sh

11 lines
289 B
Bash
Raw Normal View History

2023-01-19 22:59:31 +00:00
#!/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