10 ms·
I quite like using for loops for that. I use it a lot for batch audio conversion with ffmpeg: for f in *.wma; do ffmpeg -i "$f" "${f/.wma/.mp3}"; done
by tyrmored 17y ago
I quite like using for loops for that. I use it a lot for batch audio conversion with ffmpeg:
for f in *.wma; do ffmpeg -i "$f" "${f/.wma/.mp3}"; done
- Periodic 17y agoI end up using this template for a lot of operations. Where rename really seems applicable is when you want to do complicated renamings such that regular expressions really are appropriate.
- deleted 17y ago[deleted]
- tyrmored 17y agoYeah. I used to love Bash but these days anything that takes more than a couple of lines I just use Perl. Its ubiquity helps a lot.