Bash Extract Substring From Variable Definition