16 lines
390 B
Bash
Executable File
16 lines
390 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Loop through all .wav files in the current directory
|
|
for file in *.wav; do
|
|
# Skip if no .wav files exist (prevents literal "*.wav" execution)
|
|
[ -e "$file" ] || continue
|
|
|
|
# Replace .wav extension with .mp3
|
|
output="${file%.wav}.mp3"
|
|
|
|
echo "Converting: $file -> $output"
|
|
lame -v -b 256 "$file" "$output"
|
|
done
|
|
|
|
echo "Conversion complete!"
|