Man, bash intrinsic string manipulation is so fun. You can use it for so many things that you might first think to do with something more complicated.
This bit in my soundpost making script that changes according to whether I give it catbox+zz link or just one of them is comfy as hell.
>read -p "Upload sound, paste catbox url here: " cburl>read -p "Upload sound, paste z.zz url here: " zzurl>mv "${5%.*}${cburl:+[sound=https%3A%2F%2Ffiles.catbox.moe%2F${cburl##*/}]}${zzurl:+[sound=https%3A%2F%2Fz.zz.fo%2F${zzurl##*/}]}.webm" .