Hi all
I have two scripts that I use. The first one downloads podcasts for me:
Code: Select all
#!/bin/sh
urxvt -e yt-dlp -f wa --external-downloader aria2c --embed-thumbnail --batch-file /root/download.txt --path /root/Downloads/Podcasts
Once I have my podcast, I use the second script to remove the unnecessary additional characters in the filename:
Code: Select all
#!/bin/sh
for file in *.m4a ; do
head=${file#*[} #part of file name up to (and including) left bracket '['
find=[${head%]*}] #pair of brackets with string (=the stuff that should be removed)
rename "$find" '' "$file"
done
In an ideal world I would like both to be combined so that I have a single script to run.
Can you inform me what needs to be done?
Both work perfectly, as is