I have directory of recording with
foo - bar-202009.opus
unix - tilde-2020se.opus
stack - exchange-29328f.opus
I trying to set meta from file name
for foo - bar.202009.opus
(there are some inconsistency with -
so easy way is scrapping -<6digitchars>.opus)
song title = foo - bar
Using sed to scrap,
$ ls | sed 's/-[a-zA-Z0-9]*\w//g; s/.opus//g'
foo - bar
unix - tilde
stack - exchange
I use id3tag to set, synatx
id3tag --song=[tilte] [file]
I have all those in directory, so iterating with while & read,
ls | while read x; \
do id3tag \
$(echo \
--song=\"$(echo $x | sed 's/-[a-zA-Z0-9]*\w//g; s/.opus//g')\" \
\"${x}\"
); \
done
problem with above is, the spaces in input file causes id3 to interpret as another file (even when
enclosed with \"${x}\")
so output right now,
foo
'bar"'
'"bar-202009.opus"'
.
.
Is there a way for i3dtag to see file with spaces as a single file.
lsunix.stackexchange.com/questions/128985/…