#!/bin/bash
for a in ./*.flac; do
ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}"
done
I found this script a few days ago to convert all FLAC files in the current directory into the MP3 format.
What I don't understand here is the "${a[@]/%flac/mp3}" part.
I think it replaces the ending flac with mp3 for the current filename. But what eactly does the [@] part do? Is it a regular expression?