How to Extract Bash Substring

How to Extract Bash Substring