Bash Get Substring Between Two Strings Hackerrank