# can only extract feed from URL if it's chirbit.com if [[ $url == *"chirbit.com/"* ]] then # get username (cut off https://www.chirbit.com/ from front) username=${url##*chirbit.com/} # cut off any extra stuff from end username=${username%%/*} if [[ -n $username ]] then # prepend chirbit URL and append /rss to form feed rss="https://www.chirbit.com/${username}/rss" url_ext=$rss fi fi