How to replace a substring, given a string in Bash.
Replacing single instance of substring
input="1-100x100.jpg"
echo ${input/.jpg/.webp} # 1-100x100.webpinput="yt-dlp.exe"
echo ${input/.exe/} # yt-dlpinput="1-100x100.jpg.jpg"
echo ${input/.jpg/.webp} # 1-100x100.webp.jpgReplacing every instances of substring
input="2038-01-01"
echo ${input//-/_} # 2038_01_01input="2038-01-01T00:00:00Z"
echo ${input//[\-T:Z]/} # 20380101000000