#!/bin/bash s="INPUTS+=('http://d...content-available-to-author-only...n.ext/XXX/ZZZ/12345')" sed "s/')$/.ts&/g" <<< "$s" sed "s/\([0-9]\{1,\}\)\(')\)$/\1.ts\2/g" <<< "$s"
Standard input is empty
INPUTS+=('http://d...content-available-to-author-only...n.ext/XXX/ZZZ/12345.ts')
INPUTS+=('http://d...content-available-to-author-only...n.ext/XXX/ZZZ/12345.ts')