I have a link list with names in the first column and links in the last column. I want to write a script that downloads the files and names the file according to the first column. My code is
#!/bin/bash x="/group/cgl/2018/04/list.dat"
title=$(awk '{print $1}' $x)
Parameter=$(awk '{print $NF}' $x)
youtube-dl -x --audio-format mp3 -o "%("$title")s.%(ext)s" $Parameter
it is able to download and convert the files to mp3 if i leave the
-o "%("$title")s.%(ext)s"
out. Whats wrong with this code, it gives me the error
youtube-dl: error: Cannot download a video and extract audio into the same file! Use "%(heuteXpress.%(ext)s" instead of "%(heuteXpress" as the output template
but fixing it like that doesnt solve it and gives a simmilar error.