Re: First attempt at (follow along) bash script, critical assessment please

2022-07-24 Thread Russell Coker via luv-main
# the following should not be line wrapped MP3S:=$(shell for n in *.ogg ; do echo $$n | sed -e s/^/mp3\\// -e s/ogg$$/ mp3/ ; done) all: $(MP3S) mp3/%.mp3: %.ogg avconv -i $< -map 0:a -c:a copy $@ ffmpeg -i $< $(OPTS) $@ You could do that in a Makefile like the above, that

Re: First attempt at (follow along) bash script, critical assessment please

2022-07-24 Thread Rodney Brown via luv-main
David's suggestion on using echo is good for checking scripts before letting them loose. There's shellcheck (lint tool for shell scripts) available for Debian, Fedora etc ... which I should remember to use more often. Filenames with spaces in them will give problems, maybe check you don't

Re: First attempt at (follow along) bash script, critical assessment please

2022-07-24 Thread David via luv-main
On Sun, 24 Jul 2022 at 17:19, Andrew Greig via luv-main wrote: > Hi, > > I am trying to populate a drive with music and I have encountered some > folders of .ogg files and I wish to convert them to .mp3 > > I am following along with a description of the process found here >

First attempt at (follow along) bash script, critical assessment please

2022-07-24 Thread Andrew Greig via luv-main
Hi, I am trying to populate a drive with music and I have encountered some folders of .ogg files and I wish to convert them to .mp3 I am following along with a description of the process found here https://linuxconfig.org/how-to-batch-convert-music-files-with-ffmpeg Does this look right,