For example, given:
USCAGoleta9311734.5021-120.1287855805
I want to extract just:
US
easiest way is
${string:position:length}
Where this extracts $length substring from $string at $position.
$length
$string
$position
This is a bash builtin so awk or sed is not required.