Bash Extract Substring From End Of String