Files
files/wav-to-mp3.sh
T
2026-10-22 10:27:52 -04:00

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!"